The condition isn't NULL as long as the variable item gets a value to a next item. If the loop has set the label tally to 0 for all items on the conveyor, the next item after the last one will get the reference NULL. Then the loop is ending.
Usually while loop will work for true or false conditions. If true execute the code or false skip the code. Here variable item which returns a path reference for while(item) condition, then how the while loop will run. Is that considered to be true. If it is considered to be true then why it is considered to be true.Is Null is considered to be false.
Flexscript follows similar rules to C and C++ when it comes to implicit boolean conversions. A treenode behaves like a pointer in this context.
https://en.cppreference.com/w/cpp/language/implicit_conversion
Yepp, that is how it works. As long as it works , what does it matter that something is true and nothing is false.
11 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved