Parameters passed by value

When a parameter is passed by value, the actual value is passed on the stack.  The amount of space occupied will vary, depending upon the data type as indicated in the following table.  A parameter passed by value is usually accessed in this way:

SUB MySub(BYVAL xyz&)

  ! MOV ECX, xyz&    ; ECX now contains xyz&

  ' ...more code would go in here

END SUB

    

Argument type

Size on the stack (in bytes)

Byte, Word, Integer

4

Dword, Long, Single

4

Quad, Double, Currency, Extended Currency

8

Extended-Precision Float

12

Dynamic String

4

 

See Also

The Inline Assembler

Passing parameters

Parameters passed by reference or by copy

Passing arrays

Passing dynamic strings

Accessing PowerBASIC variables by name