View Single Post
Old 23 August 2015, 02:00   #297
AMOS Extensions Developer
Lonewolf10's Avatar
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 37
Posts: 1,831
Originally Posted by Megol View Post
Originally Posted by Lonewolf10 View Post
 	For I in A ...
I in A? If I=1 what does A equal? 1?
So you just doesn't like a BASIC that supports that syntax?
I didn't like it because I didn't understand it.

Thanks to Samurai's explanation I think I understand it (though Mrs Beanbags example I find confusing, but it could just be me being sleepy...)

Originally Posted by Megol View Post
FOR I=0 TO 100
Using the same logic you applied to the above example this should change the definition of 0 to 1.
That was not my intention. I completely understand that because I have used FOR... NEXT loops many times when programming in BASIC on the Amiga, Spectrum and (very briefly) Acorn BBC Micro and Acorn Archemedes.

It's the use of "in" that I'm not used to

For I in A ...
and would be much better if you changed the "in" to "="

Unless I'm completely misunderstanding what it does...

I'll have to try some experiments in Visual BASIC tomorrow
Lonewolf10 is offline  
Page generated in 0.05529 seconds with 9 queries