pushl

Synopsis

pushl([$var => value, ...])

creates an additional local scope.

Parameters

[$var => $value, ...] - the local scope may be initialized with these key/value pairs.

Side Effects / Notes

Examples

inline swap { pushl($a => $1, $b => $2); local('$temp'); $temp = $b; $b = $a; $a = $temp; popl(); } sub bar { local('$x $y $temp'); $temp = 100; $x = 3; $y = 9; println("\$x: $x and \$y: $y"); swap($x, $y); println("\$x: $x and \$y: $y (and $temp $+ )"); } bar();

$x: 3 and $y: 9 $x: 9 and $y: 3 (and 100)

See Also