- This wiki is out of date, use the continuation of this wiki instead
Exists
From FenixWiki
(Difference between revisions)
| Revision as of 14:00, 19 April 2007 (edit) Sandman (Talk | contribs) ← Previous diff |
Revision as of 14:00, 19 April 2007 (edit) (undo) Sandman (Talk | contribs) m (→Definition) Next diff → |
||
| Line 5: | Line 5: | ||
| '''INT''' Exists ( <'''INT''' processID|processType> ) | '''INT''' Exists ( <'''INT''' processID|processType> ) | ||
| - | Checks if a [[process]] is alive. | + | Checks if a [[process]] is alive, using its [[processID]] or [[processType]]. |
| == Parameters == | == Parameters == | ||
Revision as of 14:00, 19 April 2007
Contents |
Definition
INT Exists ( <INT processID|processType> )
Checks if a process is alive, using its processID or processType.
Parameters
| INT processID or processType | - The ID or Type of the process to be checked. |
Returns
INT : The result of the check
| 0 (false) | - The process with given processID is not alive or there are no processes alive of the given type. |
| 1 (true) | - The process with given processID is alive or there is at least one process alive of the given type. |
Example
Program example;
Begin
Proc();
if(exists(id))
say("I exist!");
end
if(exists(type main))
say("I exist!");
end
if(exists(0))
say("0 doesn't exist");
end
if(exists(type proc))
say("Proc exists!");
else
say("Proc doesn't exist!");
end
Loop
frame;
End
End
Process Proc()
Begin
Loop
frame;
End
End
Used in example: Say()
