ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

XFoot Conversion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • XFoot Conversion

    Does anyone have a clue about a simple /FREE conversion for XFoot?

    PHP Code:
          /END-FREE
         C                   XFoot     CCT_Knt       CCT_KntX
         C                   XFoot     CCT_Amt       CCT_AmtX
          
    /FREE 

  • #2
    Re: XFoot Conversion

    http://publib.boulder.ibm.com/iserie...htm#HDRBBXFOOT

    Code:
    %XFOOT (Sum Array Expression Elements)
    %XFOOT(array-expression)
    
    %XFOOT results in the sum of all elements of the specified numeric array expression. 
    
    The precision of the result is the minimum that can hold the result of adding 
    together all array elements, up to a maximum of 31 digits. The number of 
    decimal places in the result is always the same as the decimal places of 
    the array expression. 
    
    For example, if ARR is an array of 500 elements of precision (17,4), 
    the result of %XFOOT(ARR) is (20,4). 
    
    For %XFOOT(X) where X has precision (m,n), the following table 
    shows the precision of the result based on the number of elements of X: 
    
    Elements of X      Precision of %XFOOT(X)
    1                  (m,n)
    2-10               (m+1,n)
    11-100             (m+2,n)
    101-1000           (m+3,n)
    1001-10000         (m+4,n)
    10001-32767        (m+5,n) 
    
    Normal rules for array expressions apply. For example, if ARR1 
    has 10 elements and ARR2 has 20 elements, %XFOOT(ARR1+ARR2) 
    results in the sum of the first 10 elements of ARR1+ARR2. 
    
    This built-in function is similar to the XFOOT operation, except that 
    float arrays are summed like all other types, beginning from index 1 on up. 
    
    
    --------------------------------------------------------------------------------
    
    %XLATE (Translate)
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: XFoot Conversion

      Ya know .. I never really saw that option and I looked through it quite a few times... either I need new glasses or I need to go home and drink more beer.

      A dilemma indeed...

      Thanks Tom

      Comment


      • #4
        Re: XFoot Conversion

        well, beer is cheaper
        Your future President
        Bryce

        ---------------------------------------------
        http://www.bravobryce.com

        Comment

        Working...
        X