Saturday, 6 January 2018

%EDITFLT Example

      * 
      * Description :·%EditFlt() Example
      *
      * Syntex      :
      *
      * %EditFlt(Numeric Expression)
      *
      * Function    :·Character external display representation of float
      *
      * Note        :·Returned string length
      *               4F => 14A
      *               8F => 23A
      *
      *=====================================================
      *
     D FloatVar        S              8F   Inz(123456.78)

     C
      /Free

           Str = %EditFlt(FloatVar) ;
           Dsply Str ;                       // +1.234567800000000E+005

           Str = %EditFlt(FloatVar - 1E4) ;  // +1.134567800000000E+005
           Dsply Str ;

      /End-Free
     C                   SetOn                                        LR

No comments:

Post a Comment