RETURN LENGTH OF INPUT STRING


start figure

       ** Return the length of the input string to the caller .....PProcedure++++++..B...................Functions++++++++++++++++++++++++++++ 0076 P Strlen          B                   EXPORT .....DName+++++++++++EUDS.......Length+TDc.Functions++++++++++++++++++++++++++++ 0077 D Strlen          PI            10I 0 0078 D  InputStr                   4096A   CONST 0079 D nPos            S             10I 0 0080 D CheckStr        S             +1    LIKE(InputStr) .....CSRn01Factor1+++++++OpCode(ex)Factor2+++++++Result++++++++Len++DcHiLoEq.... 0081 C                   MoveL     InputStr      CheckStr 0082 C     ' '           CheckR    CheckStr      nPos 0083 C                   Return    nPos - 1 .....PProcName+++++++..B...................Functions++++++++++++++++++++++++++++ 0084 P StrLen          E 

end figure

Figure D.6: ZTOOLS example procedures— Return Length of Input String.




The Modern RPG IV Language
The Modern RPG IV Language
ISBN: 1583470646
EAN: 2147483647
Year: 2003
Pages: 156
Authors: Robert Cozzi

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net