numberformat woes?

Pi Digital sean at pidigital.co.uk
Thu Nov 7 08:28:29 EST 2019


Hi Klaus

Had a similar issue. To overcome I just added “” afterward. Sounds counterintuitive but worked. So:

Put tNextNr + “” into cLetzteLaufendeNummer

Sean Cole
Pi Digital Prod Ltd

> On 7 Nov 2019, at 13:19, Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Bonjour Thierry,
> 
>> Am 07.11.2019 um 14:09 schrieb Thierry Douez via use-livecode <use-livecode at 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
> klaus at major-k.de
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list