next up previous contents
Next: Pike_error() Up: Interacting with the Stack Previous: Pop Functions   Contents

Push Functions

Return values are pushed to the stack. Since Pike has a lot of different data types there are a lot of push functions. They all work more or less the same. What they do is that they take the parameter and push it to the stack. The call to push a variable called arg of type foo would be push_foo(arg). Two examples of push functions are listed below:

/*Example of usage:*/
   push_int(1378);
push_int() pushes an integer on the stack. The example pushes 1378 on the top of the stack.

/*Example of usage:*/
   struct pike_string *str = make_shared_binary_string("",0); 
   push_string(str);
push_string() pushes a pike_string to the stack. The example shows how the empty string is pushed to the stack.



2003-03-04