Post Reply 
notebook code error
01-04-2023, 04:22 AM
Post: #5
RE: notebook code error
(01-03-2023 01:06 AM)Dougggg Wrote:  I dont know if CASE works that way on the prime

here is a Example from the Demo Case


#pragma mode( separator(.,Wink integer(h32) )
EXPORT Demo_CASE()
BEGIN
LOCAL my_rnd,out_str,forever;

REPEAT
PRINT();
FOR J FROM 1 TO 10 DO
my_rnd:=ROUND(RANDOM(1,100),0);
out_str:="Run "+J+", RND:="+my_rnd;
CASE
IF my_rnd<=25 THEN PRINT(out_str+" <= 25") END;
IF my_rnd<=50 THEN PRINT(out_str+" <= 50") END;
IF my_rnd<=75 THEN PRINT(out_str+" <= 75") END;
DEFAULT PRINT(out_str+" <= 100");
END;
END;
PRINT("Press any key to repeat, ON to exit.");
WAIT();
UNTIL forever;

END;

Thanks for the info, I'll check it out.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
notebook code error - DrEureka - 01-02-2023, 07:10 AM
RE: notebook code error - Didier Lachieze - 01-02-2023, 08:34 AM
RE: notebook code error - DrEureka - 01-04-2023, 04:18 AM
RE: notebook code error - Dougggg - 01-03-2023, 01:06 AM
RE: notebook code error - DrEureka - 01-04-2023 04:22 AM
RE: notebook code error - DrEureka - 01-04-2023, 04:39 AM
RE: notebook code error - roadrunner - 01-04-2023, 01:47 PM



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