Bonjour Thierry,

> Am 07.11.2019 um 14:09 schrieb Thierry Douez via use-livecode 
> <use-livecode@lists.runrev.com>:
> 
> Hallo Klaus,
> 
> Umm, thinking loudly, I would say numberformat has a local scope ...

ah, that was what I was missing, merci, mon ami!

But see below...

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
 ## !!
 ## However this line IS Inside of the local cope of numberformat
 set the cLetzteLaufendeNummer of this stack to tNewNext
 ## !!
 return tNewNext
end fNextNr

So -> the cLetzteLaufendeNummer of this stack should result in e.g. 0003 but is 
in fact 3?
At least this is shown in the Custom Property departement of the inspector for 
my stack.

Hm, it is getting even stranger, maybe I just don't get it? :-D
This:
...
put the cLetzteLaufendeNummer of this stack
...
-> 3

But this:
...
set the numberformat to 0000
put the cLetzteLaufendeNummer of this stack
...
-> 0003

No arithmetic operation involved!?

> Regards,
> 
> Thierry

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to