Name:

void the functional result of a side-effect or empty argument resp. the corresponding type

Usage:

void : void | type type

Description:

Example 1:

   > print(void);
   void
   > void;

Example 2:

   > hey = proc() { print("Hello world."); };
   > hey;
   proc()
   {
   print("Hello world.");
   return void;
   }
   > hey();
   Hello world.
   > hey(void);
   Hello world.
   > print(hey());
   Hello world.
   void

Example 3:

   > bashexecute("gcc -fPIC -Wall -c externalprocvoidexample.c");
   > bashexecute("gcc -fPIC -shared -o externalprocvoidexample externalprocvoidexample.o");
   > externalproc(foo, "./externalprocvoidexample", void -> void);
   > foo;
   foo(void) -> void
   > foo();
   Hello from the external world.
   > foo(void);
   Hello from the external world.
   > print(foo());
   Hello from the external world.
   void

Example 4:

   > procedure blub(L = ...) { print("Argument list:", L); };
   > blub(1);
   Argument list: [|1|]
   > blub();
   Argument list: [| |]
   > blub(void);
   Argument list: [|void|]
See also: error, proc, externalproc
Go back to the list of commands