numberformat woes?

Brian Milby brian at milby7.com
Thu Nov 7 08:21:35 EST 2019


You are saving a number and not a string.  Numberformat governs how a number is displayed as a string doesn’t it?

Thanks,
Brian
On Nov 7, 2019, 8:19 AM -0500, 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