I have a function that returns a string. It is always returning a null string. I have narrowed it down to:
Code: Select all
DEFine FuNction something$
LOCal buffer$(30), ptr, character$: REM And other stuff, not needed here.
:
ptr = 1
REPeat Loop
REMark Do something to create character$
character$ = doSomething$(x,y,z)
buffer${ptr} = character$
ptr = ptr + 1
:
REMark Some way to exit the loop.
IF something THEN EXIT Loop: END IF
END REPeat Loop
RETurn buffer$
Code: Select all
DIM a$(10)
a$(3) = "?"
PRINT a$: REMark gives a NULL string!
PRINT LEN(a$): REMark gives zero!
PRINT a$(3): REMark Gives "?"!!!
What the hell have I forgotten about dimensioned strings?
Cheers,
Norm.