ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
return 1 in entry trigger?
I see in an example that there is a "return 1" in a queue's entry trigger, what is the meaning of this.
Most time there is no "return" in the trigger at all. |
#2
|
||||
|
||||
The return value of a trigger function has no meaning unless stated otherwise, as is the case with the OnBeginOffset trigger function found on a BasicTE. I looked through the list of options for a Queue's OnEntry trigger and I did not see any that had a "return 1". Could you be looking at the OnEntry of a Queue in a model that someone made? If so, then my guess is that the person who built the model just wrote a return statement out of habit. It won't hurt anything to have a return. The other possibility is that the return statement was being used to exit the OnEntry trigger function earlier to skip some code below it. Incidentally, the default return value for trigger functions is 0 (which happens outside the scope of the code you see in the code edit window).
|
The Following 2 Users Say Thank You to Cliff King For This Useful Post: | ||
qin tian (05-07-2008) |
Thread | Thread Starter | Forum | Replies | Last Post |
On Message Trigger | Anthony Timmiss | Q&A | 19 | 08-13-2008 08:20 AM |
can I use an edit box entry to update multiple labels? | KelvinHo | Q&A | 10 | 03-28-2008 07:17 AM |
Entry trigger | mallik | Q&A | 4 | 01-25-2008 07:18 AM |
manual entry | danieldiep | Q&A | 5 | 11-26-2007 06:11 AM |