copy

Prev Next

Function Names

copy

Description

This function copies the value specified in the 1st parameter into the remaining parameters. These parameters must either be variables or tables entries.

Call as: procedure

Restrictions

Indirect parameter passing is disabled

Parameter count

Min 1

Parameters

No.TypeDescription
1
input
all types Source value

Only the value in this variable will be copied. Member variables, if existing, will not be included.

2, etc.
output
all types Destination variable or table entry

The value specified in the 1st parameter will be copied into this speified destination.

Examples

  table initialize( t, {"Header"} );

  copy( 15, a[], b[], b[x,y], [t:Header,1] );
  // Copies into two base variables, into a sub-member of b[], and into a table (row 1).

  echo( a[], ", ", b[], ", ", b[x,y], ", ", [t:Header,1] );

Output

15, 15, 15, 15
Try it yourself: Open LIB_Function_copy.b4p in B4P_Examples.zip. Decompress before use.