bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] Indexing Arrays with number which have leading zero behaves u


From: Kolbe, Wulf
Subject: [bug-gawk] Indexing Arrays with number which have leading zero behaves unexpected
Date: Sun, 3 Jun 2018 09:54:43 +0000

Dear All,
please find enclosed a small program which shows an effect during indexing 
arrays with numbers which have leading zeros.
It behaves at least unexpected for me, because of the behavior changes during 
increasing the index number.
If you run all numbers from 000-to255, then it works between 000-064, then 
there is a gap of approx. 16 places and then it works again.

BEGIN{
B[04]=2; printf("%d\n",B[4]);printf("%d\n",B[04]);
B[064]=42; printf("%d\n",B[64]);printf("%d\n",B[064]);
}

This effect was found on CoCalc Clouds gawk 4.1.3 but also verified on a lot of 
older versions.
The leading zeros were written to visually inspect lists with values like 
palette definitions and there the effect shows as funny gab in the palette.


Wulf

Wulf Kolbe
Innovation Manager
DEUTA Werke GmbH
Paffrather Straße 140,
D-51465 Bergisch Gladbach
Email: address@hidden
Registergericht Köln HRB 67107, Geschäftsführer: Thomas Blau, Dr. Rudolf Ganz

---------------------------------------------------------------------------------------------------------------------------
Diese e-mail ist von rein informativem Charakter und beinhaltet keinerlei 
vertragliche Bindung seitens der DEUTA Werke GmbH solange sie nicht durch eine 
schriftliche und im Auftrag von Deuta gezeichnete Mitteilung bestätigt wird.
-----------------------------------------------------------------------------------------------------------------Nothing
 in this e-mail may be construed as amounting to a contractual or other legal 
commitment on the part of DEUTA Werke GmbH unless confirmed by a letter, signed 
on behalf of the company.
---------------------------------------------------------------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]