Morning Jan,
That matches with Jan Jones. Arrays index from zero, but simple strings from 1.
Cheers,
Norm.
--
Author of "Arduino Software Internals" and "Arduino Interrupts".
___
QL-Users Mailing List
Could the reference be the SBASIC/SuperBASIC reference manual?
That says
When a string array is set up with DIM, each entry is set to a nul string
(“”). The zero’th element of each string array
contains the actual length of that string, for example:
DIM a$(10,10): a$(1)='Hello': PRINT a$(1,0)
will
On 12-01-2024 16:20, Norman Dunbar via Ql-Users wrote:
If I remember correctly, all the way back to 1984-85, I'm almost
certain that the supplied QL manual, in the large, heavy, A$ folder,
mentioned that string lengths are indeed stored in a$(0)---or at
least, can be accessed from there.
C
On 08/01/2024 18:46, pjw via Ql-Users wrote:
> 100 a$ = "1234567890"
> 105 b$ = a$(4 to 3): REMark This works
> 110 REMark c$ = a$(4 to 2): REMark This fails with an error.
> 115 c$ = a$( to 0) : REMark no error returned
> 120 c$ = a$(0):: REMark no error returned BUT ERROR IF QLIBERATED
>
On 08/01/2024 16:51, Wolfgang Lenerz via Ql-Users wrote:
Line 120 is due to the fast that strings are not 0 based index. So what
would a$(0) be?
Under SMSQ/E at least, print a$(0) in the above example would give "10"
- which is the length of the string... Since this seems to be an
unorthodox b
Op 12/01/2024 om 10:00 schreef Urs Koenig (QL) via Ql-Users:
https://youtube.com/shorts/4qxf66zTu9s?si=_dnRFNWczFK5iu-m
Von meinem iPhone gesendet
___
QL-Users Mailing List
Hi,
I do remember my first QL.
My late brother-in-law wrote his first novel
https://youtube.com/shorts/4qxf66zTu9s?si=_dnRFNWczFK5iu-m
Von meinem iPhone gesendet
___
QL-Users Mailing List