[435] in Coldmud discussion meeting

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

while {statements} (testexpr) {statements}

daemon@ATHENA.MIT.EDU (Thu Sep 22 18:53:54 1994 )

From: deforest@netcom.com (Robert de Forest)
To: coldstuff@MIT.EDU (cold)
Date: Thu, 22 Sep 1994 15:47:24 -0700 (PDT)

Just want to clarify/see if I read that right:

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

Does that mean

while {
  .stuff();
} (.test()) {
  .more_stuff();
}

would be legal?

And would it be equivalent to

while (1) {
  .stuff();
  if (!(.test()))
    break;
  .more_stuff();
}

?

I kinda like it, if that's what it is...

Crag / Robert de Forest