While converting an old Cbasic program to Ebasic, I found this particular code :
Pay attention to the first line with the FOR statement
It took me a few minutes searching The Cbasic User guide to figure out what that meant.
See the extract below :
...
for ang=0 to (1815*speed) #aint[speed]
ca360=ang
ca=-1*(ca360-90)
pinx=cosd(ca)*halfs
piny=sind(ca)*halfs
rody=sqrt(rodl^2 + pinx^2)
pispin=rody+piny
pistop=pispin+ch
roda=atan(pinx/rody)/deg2rad
rodw=3.500
'convert rod angle to radians
rarad=roda*deg2rad
gosub draw
next ang
...
QuoteSTEP Usage
FOR loopvar = startno TO endno #stepno
----- OR -----
FOR loopvar = startno TO endno STEP stepno
Also
QuoteFOR variable = start TO end {# skip}
â€Ã,¦
NEXT variable
FOR counter = 1 TO 20 #2
PRINT "Hello ",name$
NEXT counter
Hope this TIPS can be helpful to anyone.
What is that ???
I never see something similiar ::)
#aint[speed] - is that pointer or what?
Hi Zlatko!
As explained above,
#aint[speed]
and
step aint[speed]
are the same in Cbasic .
Ahh I see that is just variable name ;D
I think ::)