numberformat woes?
Klaus major-k
klaus at major-k.de
Thu Nov 7 07:58:18 EST 2019
Hi friends,
this snippet:
...
set the numberformat to 0000
put EMPTY into tNextNr
if tNextNr = EMPTY then
put 1 + 0 into tNewNext
else
put tNextNr + 1 into tNewNext
end if
put tNewNext
...
-> 0001
However if I put this into a function:
function fNextNr
set the numberformat to 0000
put the cLetzteLaufendeNummer of this stack into tNextNr
if tNextNr = EMPTY then
put 1 + 0 into tNewNext
else
put tNextNr + 1 into tNewNext
end if
set the cLetzteLaufendeNummer of this stack to tNewNext
return tNewNext
end fNextNr
tNewNext = 1 (If tNextNr = EMPTY, resp 2,3,4..., if not)?
What am I missing?
LC 9.5, macOS 10.14.6
Thanks a lot in advance!
Best
Klaus
--
Klaus Major
https://www.major-k.de
klaus at major-k.de
More information about the use-livecode
mailing list