Skip to content

Get_Stack_Argument

Include: Use System\Reflection.pkg

See Also: TypeOf, DfType

Purpose

Reads an argument from the current call stack frame.

Syntax

Get_Stack_Argument iIndex to vValue
Function Get_Stack_Argument Global Integer iIndex Returns Variant

Arguments

iIndex : One-based argument index.

vValue : Receives the argument when using the command form.

Returns

The command form writes the argument to vValue. The function form returns the argument as a Variant.

Behavior

Index values outside the current argument range raise a DataFlex error.

Example

Procedure ShowArguments String sName Integer iScore
    Variant vFirst vSecond
    String sReadName
    Integer iReadScore

    Get_Stack_Argument 1 to vFirst
    Get Get_Stack_Argument 2 to vSecond

    Move vFirst to sReadName
    Move vSecond to iReadScore
End_Procedure

Send ShowArguments "Ada" 10