Re: Speed In Cogs


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

Posted by Billcow [JiB] on February 17, 1998 at 07:26:12:

In Reply to: Re: Speed In Cogs posted by Osan`gar on February 16, 1998 at 17:40:01:

> > > > I guess my question is this.... are these valid lines in a cog?

> > > > float speed=1.0 desc=thrust_speed
> > > > float speed1=1.0 desc=thrust_speed

> > They are both valid symbol assignments. Though you should use "flex" rather than "float" You don`t have to be as concerned with what type of number it has then.
> > The "desc=" is just a description not required. But it doesn`t hurt either.

> > The reason why you see some things called vector0,vector1.. vector9 is so they can be used as an array .
> > you could call them any name you want otherwise.

> > like
> >
> > flex slow_thrustspeed=1 # thrusts for what ever
> > flex fast_thrustspeed=2.3

> Sorry I didn't catch the float thingy. I've got C on my mind and I almost write float when I do COGs anyways. I just overlooked that. So arrays are used in COG?
In fact, to do an array, when you refer to an array, you put:
x = arrayname[elementnumber]
and then to define it you would go:
int arrayname=1
int arrayname1=2
int arrayname2=3
int arrayname3=4
int arrayname4=5


Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]