Post Reply 
Checking conditions [IF ... THEN ... ELSE] performance
09-14-2015, 10:06 PM (This post was last modified: 09-14-2015 10:15 PM by roadrunner.)
Post: #6
RE: Checking conditions [IF ... THEN ... ELSE] performance
When time is an issue in any particular program the equivalent can be achieved with current PPL code using nested if's or the case function. Here's an example:

Code:
EXPORT eraseme1()
BEGIN
 if 1==1 then
  if wait(5)==5 then "true"; end;
 else "false"; end;
END;

export eraseme2()
begin
 if 1==2 then
  if wait(5)==5 then "true"; end;
 else "false"; end;
end;

eraseme1() returns "true" and takes 5 seconds to run while eraseme2() returns "false" and takes a fraction of a second to run.

-road
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Checking conditions [IF ... THEN ... ELSE] performance - roadrunner - 09-14-2015 10:06 PM



User(s) browsing this thread: 1 Guest(s)