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
|
||||
|
||||
Getting rid of boolean magic numbers
In all my new models I add the following two lines to the defines:
#define true 1 #define false 0 and that allows me using things like nodetomodelpath(myobj, true); instead of nodetomodelpath(myobj, 1); Not a big deal at all, but IMHO makes the code more readable. |
#2
|
||||
|
||||
You don't need to define true and false. "true" is 1 and "false" is 0 by default.
nodetomodelpath(myobj, true); (I've tried this only in Flexsim 6.02) |
The Following 3 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Vadim Fooks (09-17-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
Implementing common random numbers? | thill | Q&A | 8 | 11-14-2008 11:59 AM |
Non Repeating Random Numbers | Xavier Jackson | Q&A | 3 | 07-30-2008 09:54 AM |
real random numbers | Vinay Mehendiratta | Q&A | 1 | 07-15-2008 10:09 AM |