Alaska Software Inc. - transform() misbehaviour
Username: Password:
AuthorTopic: transform() misbehaviour
Thomas Braun
transform() misbehaviour
on Tue, 16 Oct 2007 13:22:54 +0200
Hi,

I have found the transform picture function @L<c> to be failing for cases,
where a "0" is inside the numerical value:

Example code:

   FOR nI := 1 TO 2500
      IF nI != VAL(TRANSFORM(nI, "@L0 99999"))
         ? nI, TRANSFORM(nI, "@L0 99999")
         inkey(0)
      ELSE
         ? nI, TRANSFORM(nI, "@L0 99999"), "OK"
      ENDIF
   NEXT

shows:

   695 00695 OK 
   696 00696 OK 
   697 00697 OK 
   698 00698 OK 
   699 00699 OK 
   700 00000    
   701 00001    
   702 00002    
   703 00003    
   704 00004    
   705 00005    
   706 00006    

I will now build my own formatting function for this special case <s>

regards
Thomas
Bjrn KaarigstadRe: transform() misbehaviour
on Tue, 16 Oct 2007 16:35:04 +0200
I use this all the time, so I had to test it, and luckely for me I can say
I find no problem.
The code you presented runs whitout any problem here.
What version are you using. 1.90.331 here.


B.I.Kaarigstad.

"Thomas Braun" <spam@software-braun.de> skrev i melding
news:djwwsxpmks3t$.18s2gyndizffb.dlg@40tude.net...
> Hi,
>
> I have found the transform picture function @L<c> to be failing for cases,
> where a "0" is inside the numerical value:
>
> Example code:
>
>   FOR nI := 1 TO 2500
>      IF nI != VAL(TRANSFORM(nI, "@L0 99999"))
>         ? nI, TRANSFORM(nI, "@L0 99999")
>         inkey(0)
>      ELSE
>         ? nI, TRANSFORM(nI, "@L0 99999"), "OK"
>      ENDIF
>   NEXT
>
> shows:
>
>   695 00695 OK
>   696 00696 OK
>   697 00697 OK
>   698 00698 OK
>   699 00699 OK
>   700 00000
>   701 00001
>   702 00002
>   703 00003
>   704 00004
>   705 00005
>   706 00006
>
> I will now build my own formatting function for this special case <s>
>
> regards
> Thomas
Thomas Braun
Re: transform() misbehaviour
on Tue, 16 Oct 2007 17:28:25 +0200
Bjørn Kaarigstad wrote:

> I use this all the time, so I had to test it, and luckely for me I can say
> I find no problem.
> The code you presented runs whitout any problem here.
> What version are you using. 1.90.331 here.
> 

No 1.9 version, so this seems to be an older, fixed problem - maybe time to
do an update 

Thomas