ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 05-06-2008
qin tian qin tian is offline
Flexsim User
 
Join Date: Dec 2007
Location: Shanghai, China
Posts: 137
Downloads: 115
Uploads: 0
Thanks: 59
Thanked 3 Times in 3 Posts
Rep Power: 161
qin tian is on a distinguished road
Default 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  
Old 05-07-2008
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 412
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.