Why use while if only iterating once ?
Venkat
venkatram.akkineni at gmail.com
Sat Nov 3 21:03:16 UTC 2018
while (1)
{
FLAGS f;
switch (*p)
{
case 'U':
case 'u':
f = FLAGS.unsigned;
goto L1;
case 'l':
f = FLAGS.long_;
error("lower case integer suffix 'l' is not
allowed. Please use 'L' instead");
goto L1;
case 'L':
f = FLAGS.long_;
L1:
p++;
if ((flags & f) && !err)
{
error("unrecognized token");
err = true;
}
flags = cast(FLAGS)(flags | f);
continue;
default:
break;
}
break;
}
The last break statement prevents the loop from returned for a
second iteration. Then why use a while ?
More information about the Digitalmars-d-learn
mailing list