User`s manual

202 digi.com Keywords
firsttime
The keyword firsttime in front of a function body declares the function to have an implicit *CoData
parameter as the first parameter. This parameter should not be specified in the call or the prototype, but
only in the function body parameter list. The compiler generates the code to automatically pass the pointer
to the CoData structure associated with the costatement from which the call is made. A firstime
function can only be called from inside of a costatement, cofunction, or slice statement. The DelayTick
function from COSTATE.LIB below is an example of a firsttime function.
firsttime nodebug int DelayTicks(CoData *pfb, unsigned int ticks)
{
if(ticks==0) return 1;
if(pfb->firsttime){
fb->firsttime=0;
/* save current ticker */
fb->content.ul=(unsigned long)TICK_TIMER;
}
else if (TICK_TIMER - pfb->content.ul >= ticks)
return 1;
return 0;
}
float
Declares variables, function return values, or arrays, as 32-bit IEEE floating point.
int func(){
float x, y, *p;
float PI = 3.14159265;
...
}
float func( float par ){
...
}