Short circuit logic
|
04-18-2020, 08:17 AM
Post: #1
|
|||
|
|||
Short circuit logic
I found that I can replace IFs with short circuit logic. Example:
IF a>b THEN do_something; do_something_else; END; can be replaced by: (a>b) AND (do_something; do_something_else); as long as do_something and do_something_else are only calls to other functions or assignments. There must not be statements like IFs, RETURNs, BEGINs, loops... But if this is a really long line the Prime finds an error in it. Any thoughts? |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Short circuit logic - mchris - 04-18-2020 08:17 AM
RE: Short circuit logic - DrD - 04-18-2020, 11:06 AM
RE: Short circuit logic - CyberAngel - 04-18-2020, 07:52 PM
RE: Short circuit logic - Carlos295pz - 04-18-2020, 11:35 AM
RE: Short circuit logic - Carlos295pz - 04-18-2020, 11:39 AM
|
User(s) browsing this thread: 1 Guest(s)