This wiki is out of date, use the continuation of this wiki instead

Father

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:14, 16 April 2007 (edit)
Sandman (Talk | contribs)
m (Local variable)
← Previous diff
Revision as of 13:35, 1 May 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 1: Line 1:
 +[[category:variables]]
 +[[category:local variables]]
 +
== Definition == == Definition ==
Father is a predefined [[local variable]]. Every [[process]] has this varaible as soon as the [[frame]]; statement is reached within the process. Father holds the [[ProcessID]] of the process that called the current process. There are several other [[local variable]]s which refer to the [[ProcessID]] of a related [[process]]: Father is a predefined [[local variable]]. Every [[process]] has this varaible as soon as the [[frame]]; statement is reached within the process. Father holds the [[ProcessID]] of the process that called the current process. There are several other [[local variable]]s which refer to the [[ProcessID]] of a related [[process]]:
Line 4: Line 7:
*[[Bigbro]] *[[Bigbro]]
*[[Smallbro]] *[[Smallbro]]
- 
== Example == == Example ==
Line 26: Line 28:
</pre> </pre>
More information on [[functions]] and [[processes]]. More information on [[functions]] and [[processes]].
- 
-[[category:predefined variables]] 
-[[category:local variables]] 

Revision as of 13:35, 1 May 2007


Definition

Father is a predefined local variable. Every process has this varaible as soon as the frame; statement is reached within the process. Father holds the ProcessID of the process that called the current process. There are several other local variables which refer to the ProcessID of a related process:

Example

process first_process()  //declaration of the first process
begin
   second_process();  //which calls the second process
   loop
      frame;        //this loop makes "first_process()" a process rather than a function
   end
end

process second_process()  //declaration of another process
begin
   x = father.x;     //These two lines use the father variable to move this process
   y = father.y;     //to the position of first_process, as the father variable here holds the ProcessID of "first_process()"
   loop
      frame;  
   end
end

More information on functions and processes.

Personal tools