[1148] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next next in chain last in chain last

Re: [COLD] scatter/optional assignments - request for discussion

daemon@ATHENA.MIT.EDU (Fri Nov 29 19:34:59 1996 )

Date: Fri, 29 Nov 1996 17:30:30 -0700 (MST)
From: Brandon Gillespie <brandon@glacier.cold.org>
To: Andrew Wilson <andrew@aaaaaaaa.demon.co.uk>
cc: Miroslav.Silovic@public.srce.hr, coldstuff@cold.org
In-Reply-To: <199611292357.XAA00906@aaaaaaaa.demon.co.uk>

> Sure.  I don't care about the syntax and ?= is better than unless,
> and I want' suggesting that a different syntax be used.  I wanted
> to know if the 'if' test implicit in ?= was on the existing value
> of the variable or if it was a test for wether or not a value had
> been assigned to the variable.
> 
> It may be the case that it really doesn't matter which property of
> a variable you test (its value, or its settedness).  In which case
> fine.

Ahhh--it is a boolean test on the value of the data, as even 'unset'
variables are technically set to zero--there is no system in the driver
for determining unset vs set (everything begins as '0').

So:

  foo = "";

  foo ?= "bar";

Would result in foo being assigned "bar".