Re: numberformat woes?

2019-11-07 Thread Klaus major-k via use-livecode


> Am 07.11.2019 um 15:12 schrieb Pi Digital via use-livecode 
> :
> 
> But with a c at the beginning ;)

Conaudampfschifffahrtsgesellschaftkapitänschlüsselloch? 
Come on! :-D

> Hehe, you guys :D

Germans...

> Sean Cole
> Pi Digital Prod Ltd

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


Re: numberformat woes?

2019-11-07 Thread Pi Digital via use-livecode
But with a c at the beginning ;)
Hehe, you guys :D

Sean Cole
Pi Digital Prod Ltd

> On 7 Nov 2019, at 14:01, hh via use-livecode  
> wrote:
> 
> Klaus, a better property name would be
> Donaudampfschifffahrtsgesellschaftkapitänskajütenschlüsselloch ;-)
> 
> 
> ___
> 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
___
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


Re: numberformat woes?

2019-11-07 Thread Klaus major-k via use-livecode
Hallo Hermann,

> Am 07.11.2019 um 15:01 schrieb hh via use-livecode 
> :
> 
> Klaus, a better property name would be
> Donaudampfschifffahrtsgesellschaftkapitänskajütenschlüsselloch ;-)

LOL! :-D

I only knew the shorter "Donaudampfschifffahrtsgesellschaftkapitänsmütze" so 
far.
Good idea in general, but not meaningful enough for my project. ;-)


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


Re: numberformat woes?

2019-11-07 Thread hh via use-livecode
Klaus, a better property name would be
Donaudampfschifffahrtsgesellschaftkapitänskajütenschlüsselloch ;-)


___
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


Re: numberformat woes?

2019-11-07 Thread Klaus major-k via use-livecode
Hi Sean,

> Am 07.11.2019 um 14:33 schrieb Pi Digital via use-livecode 
> :
> 
> Sorry, not + but &. 

oops, sorry.

Ah yes, makes sense, this forces the result to be a STRING.

A clever trick and really new to me (after using LC and its ancestors 
for 20 years now), thank you very much! :-)

>> Put tNextNr & “” into cLetzteLaufendeNummer
> Sean Cole

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


Re: numberformat woes?

2019-11-07 Thread Pi Digital via use-livecode
Sorry, not + but &. 

> Put tNextNr & “” into cLetzteLaufendeNummer

Sean Cole
Pi Digital Prod Ltd

> On 7 Nov 2019, at 13:29, Pi Digital via use-livecode 
>  wrote:
> 
> 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 
>>  wrote:
>> 
>> Bonjour Thierry,
>> 
 Am 07.11.2019 um 14:09 schrieb Thierry Douez via use-livecode 
 :
>>> 
>>> 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 
>> 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 
>> 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
> ___
> 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
___
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


Re: numberformat woes?

2019-11-07 Thread Klaus major-k via use-livecode
Hi Sean,

> Am 07.11.2019 um 14:28 schrieb Pi Digital via use-livecode 
> :
> 
> Hi Klaus
> 
> Had a similar issue. To overcome I just added “” afterward. Sounds 
> counterintuitive but worked. So:
> Put tNextNr + “” into cLetzteLaufendeNummer

so this does not count obviously:
...
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
...

This IS in fact a bit puzzling, but I get along now, thanks. :-)

> Sean Cole

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


Re: numberformat woes?

2019-11-07 Thread Klaus major-k via use-livecode
Hi Brian,

> Am 07.11.2019 um 14:21 schrieb Brian Milby via use-livecode 
> :
> 
> You are saving a number and not a string.  

aha, thanks, that makes it clearer!

> Numberformat governs how a number is displayed as a string doesn’t it?

No idea, you are the LC Pro, does it? 8-)

> Thanks,
> Brian
> On Nov 7, 2019, 8:19 AM -0500, Klaus major-k via use-livecode 
> , wrote:
>> Bonjour Thierry,
>> 
>>> Am 07.11.2019 um 14:09 schrieb Thierry Douez via use-livecode 
>>> :
>>> 
>>> 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 
>> 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 
>> put the cLetzteLaufendeNummer of this stack
>> ...
>> -> 0003
>> 
>> No arithmetic operation involved!?

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


Re: numberformat woes?

2019-11-07 Thread Pi Digital via use-livecode
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 
>  wrote:
> 
> Bonjour Thierry,
> 
>> Am 07.11.2019 um 14:09 schrieb Thierry Douez via use-livecode 
>> :
>> 
>> 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 
> 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 
> 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
___
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


Re: numberformat woes?

2019-11-07 Thread Brian Milby via use-livecode
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 
, wrote:
> Bonjour Thierry,
>
> > Am 07.11.2019 um 14:09 schrieb Thierry Douez via use-livecode 
> > :
> >
> > 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 
> 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 
> 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
___
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


Re: numberformat woes?

2019-11-07 Thread Klaus major-k via use-livecode
Bonjour Thierry,

> Am 07.11.2019 um 14:09 schrieb Thierry Douez via use-livecode 
> :
> 
> 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 
 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 
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


Re: numberformat woes?

2019-11-07 Thread Thierry Douez via use-livecode
Hallo Klaus,

Umm, thinking loudly, I would say numberformat has a local scope ...


Regards,

Thierry

What am I missing?
>
> Klaus

-- 

Thierry Douez - sunny-tdz.com
___
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


numberformat woes?

2019-11-07 Thread Klaus major-k via use-livecode
Hi friends,

this snippet:
...
set the numberformat to 
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 
  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
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