PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Question on CASE

Is this acceptable syntax:

case(t$)
"toy":
showmessage("");
"boy":
showmessage("");
end;

In otherwords, can you use strings as case members? If so, It's not working for me.
No you can't. BUT... I thought it was a great addition to PPL, so starting from today's version, yes you can! :)

This is perfectly valid in the new version:

Code:
t$ = "boy";

case (t$)
"toy":
showmessage("Toy");
"boy":
showmessage("Boy");
end;

t$ = 10;
case (t$)
10:
ShowMessage("Yeah!");
20:
ShowMessage("Oh!");
end;