BYVAL
 
Syntax


FUNCTION name (parameter list)  [AS INTEGER | STRING | SINGLE]
  parameter list = parameter [, parameter list]
  parameter  =  [BYVAL] paramname [AS INTEGER]
                   |  [BYVAL] paramname(size) AS STRING
                   |   BYREF paramname AS STRING 
                   |  [BYVAL] paramname(size) AS SINGLE
                   |   BYREF paramname AS SINGLE

Description


Used as a modifier in parameter declarations for FUNCTIONs or SUBs.

When BYVAL is used a copy of the parameter will be used in the FUNCTION or SUB.  And the FUNCTION or SUB procedure can change the copy of the parameter, BUT not the original.  BYVAL is the default declaration and is assumed if the BYVAL or BYREF keyword are not used.

Differences from other BASICs

See also