[438] in Coldmud discussion meeting

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

Re: while {statements} (testexpr) {statements}

daemon@ATHENA.MIT.EDU (Thu Sep 22 19:34:53 1994 )

From: stewarta@netcom.com (Alex Stewart)
To: deforest@netcom.com (Robert de Forest)
Date: Thu, 22 Sep 1994 16:30:19 -0700 (PDT)
Cc: coldstuff@MIT.EDU
In-Reply-To: <199409222247.PAA06101@netcom12.netcom.com> from "Robert de Forest" at Sep 22, 94 03:47:24 pm

> Change the while (expr) statement; statement into
> while statement; (expr) statement; ?

Yup, you got it exactly (and the example was correct too)..  I'm liking it the
more I think about it too.  Thus, the solution to the var-assigment-and-test
problem would just be:

while {
  var = .test();
} (var)

And you could do "until" loops by just putting all the code in the first

while {
  var = .stuff();
} (var);

You know, this kinda leads to another question which I've had all along.. can
anybody give me one single reason why "with handler" couldn't and shouldn't
just be "with" or "handler"?  Having two reserved words where one would do for
no apparent reason just really bugs me and catches me up every so often when
I'd like to use one or the other of them as a variable name..

   Alex Stewart - stewarta@netcom.com - Richelieu @ Diversity University MOO