On Thu, 14 Jan 1999, Uncle Roger wrote:
Every BASIC I've ever used had a for-next
construct as follows:
FOR variable = start TO end [BY inc]
commands
NEXT [variable]
I've never seen a "BY" modifier although I wouldn't doubt that some
BASIC
could have been designed with it. But are you sure you didn't mean
"STEP"?
No GOTO was ever needed. However, it is just a
simplified version of a
combination IF and GOTO.
Remember, C has a goto statement, although I don't think in my nearly 10
years of C programming I've ever used it, although on certain rare
occasions it seemed the easy way out to a sticky coding problem. There is
certainly a sublime satisfaction in designing elegant code with do..while
and while loops (I rarely use for's), but C really suffers from a lack of
a general error trapping mechanism that one can invoke to break out of
loops as required. Sometimes I think goto's are the answer but I can
never find an appropriate way to implement it.
Sellam Alternate e-mail: dastar(a)siconic.com
------------------------------------------------------------------------------
Always being hassled by the man.
Coming in 1999: Vintage Computer Festival 3.0
See
http://www.vintage.org/vcf for details!
[Last web site update: 12/27/98]