in reply to Re: Re: •Re: One-liners: Conditionals in Loops
in thread One-liners: Conditionals in Loops
Right you are. I finally managed to track down a copy of the RSTS/E BASIC PLUS language reference on-line. I remember using lines like
400 READ A(I%) FOR I% = 0 WHILE A(I%) < B
but in that case, the while is really a special case of the for loop rather than a modifier to it. I couldn't remember if you could use (for example) nested for modofoers on a statement with the interpreter, but I'm pretty sure that I did use the with the compiled version. I've quite often wanted (and typed)
print $_ for ( @list ) while $_ < CONSTANT; syntax error at (eval 16) line 1, near ") while"
Personally, I find the modifiers forms of many control statements more closely fit with the way I think, which probably means backwards. It's one of the reasons I took to perl so much from the start.
It's quite fun scanning the manual and re-discovering stuff I had forgotten. Virtual arrays -- I thought they were the greatest thing since sliced bread when I first encountered them. And xor being called EQV.
|
|---|