Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
ArgI
 Map                                       Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
;* @ArgI - Macro function returns an argument specified by number
;* from a VARARG list.
;*
;* Shows:   Directives - FOR       LOCAL    EXITM
;*                       TEXTEQU   =
;*          Operator   - EQ
;*
;* Params:  index - one-based number of the argument to be returned
;*          arglist - argument list
 
@ArgI MACRO index:REQ, arglist:VARARG
    LOCAL count, retstr
    count = 0
    FOR arg, <arglist>
        count = count + 1
        IF count EQ index
            retstr TEXTEQU <arg>
        ENDIF
    ENDM
    EXITM retstr
ENDM
                                    -♦-