return

Prev Next

Function Names

return

Synopsis

return;
return ( return value );

Description

If used inside a user-defined procedure or function: Returns from that called procedure / function, along with a return value, if provided.
In other cases: Similar functionality like end() procedure where control is either returned to the calling B4P program, or, if this is not the ase, program execution will end.

Call as: procedure

Restrictions

The return value will be ignored in defined procedures or if the code is called as a procedure without retrieving the returned value.

Parameter count

Max. 1

Parameters

No.TypeDescription
1.
input
all types Return Value

Return value to be passed to the calling program

Examples

      define function ( current time ) { return( time(now) ); }
      echo( "Now, it's ", current time() );

Output

Now, it's 10:09:39
Try it yourself: Open LIB_Function_return.b4p in B4P_Examples.zip. Decompress before use.

See also

define function
end