` Printed Icetips Article

Icetips Article



Par2: Deformat
1998-07-14 -- Miro Vehar
 
>StringNumber    STRING(20)
>
>  CODE
>
>  StringNumber = '1.234,56'
>  STOP(Deformat(StringNumber))                      ! 1.23456
>  STOP(Deformat(StringNumber,@n14.`2))              ! 123456
>  STOP(Deformat(StringNumber,@n14.2))               ! 123456
>  STOP(Format(StringNumber,@n14.`2))                ! 1,23
>  STOP(Format(StringNumber,@n14.2))                 ! 1.23


The corect use of DEFORMAT function is:

StringNumber        STRING(14)

  CODE

StringNumber = RIGHT('1.234,56',14)
STOP(Deformat(StringNumber,@N14`2))             ! 1234.56



Printed November 23, 2024, 3:27 am
This article has been viewed/printed 35199 times.