On 8/17/06, Chip Salzenberg <[EMAIL PROTECTED]> wrote:
How about a 'default' opcode that provides a value instead of null? It
would work for strings and PMCs. Something like:
$S0 = default hsh['key'], ''
or
$P0 = new .Undef
...
$P1 = default hsh['key1'], $P0
$P1 = default hsh['key2'], $P0
...
It would work without the lookups too:
$S0 = default $S0, '' # if $S0 is null, assign it ''
what say?
default is ugly. err is sexy.
## if $S0 is null, assign it ''
#pasm
err $S0, ''
err $S1, $S2, ''
#pir
$S0 //= ''
$S0 = err ''
$S0 = err $S1, ''
~jerry