GB.Push

void GB.Push ( int nval , ... )

Push values on the interpreter stack.

nval is the number of values you want to push.

The values are passed as additional arguments this way : the type of the value, followed by one or two data representing the value, this being repeated for each value.

Gambas type of the argument Constant used C type used Note
Boolean GB_T_BOOLEAN int 0 means FALSE, any other value means TRUE
Integer GB_T_INTEGER int  
Float GB_T_FLOAT double  
String GB_T_STRING char * , int The first value is the string pointer, the second is the string length.
If the string length can be zero, it is automatically calculated with strlen()

Example :

  GB.Push(3,
    GB_BOOLEAN, 1,
    GB_INTEGER, 1972,
    GB_FLOAT, 3.1416,
    GB_STRING, "Gambas", 6
    );


Referenced by :