Are several exit points in one rule are allowed

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
lza
Normal user
Posts: 3
Joined: 24 Aug 2019, 16:40

Are several exit points in one rule are allowed

#1 Post by lza » 24 Aug 2019, 16:44

Hi,

just wandering if I can emulate something like a return command with this construct:

Code: Select all


on Clock#Time=All,**:** do 
   if [MyTestFor#EarlyExit]>0
	 endon
   endif

  // do someting
endon


User avatar
grovkillen
Core team member
Posts: 3197
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Are several exit points in one rule are allowed

#2 Post by grovkillen » 24 Aug 2019, 16:46

You can use the else switch
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

lza
Normal user
Posts: 3
Joined: 24 Aug 2019, 16:40

Re: Are several exit points in one rule are allowed

#3 Post by lza » 24 Aug 2019, 16:59

True, for simple cases that works. But if I have much more checks I would like to simply return fast out of the rule.

User avatar
grovkillen
Core team member
Posts: 3197
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Are several exit points in one rule are allowed

#4 Post by grovkillen » 24 Aug 2019, 17:19

Then no.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

lza
Normal user
Posts: 3
Joined: 24 Aug 2019, 16:40

Re: Are several exit points in one rule are allowed

#5 Post by lza » 24 Aug 2019, 17:58

Does the interpreter checks for this? Or why is it a solid no?

User avatar
budman1758
Normal user
Posts: 231
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: Are several exit points in one rule are allowed

#6 Post by budman1758 » 24 Aug 2019, 20:23

A better description of what you are trying to do would probably yield better answers. :?:
"The glass is twice as big as it needs to be".

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests