In slot assignment rule...
I want to know what's the meaning of both sides "?".
What type of operator? And what's the meaning of it?
And I want to know also about "?.".
The question mark operator is something you can put at the end of a label name when getting a label value with the treenode.labelName syntax so that it doesn't throw an exception if the label doesn't exist. You can view the documentation here: https://docs.flexsim.com/en/21.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/treenode.html#Property-labelProperties
The 2 question marks are here so that it doesn't throw exceptions if all your slots don't have a Type label or if all your items don't have a Type label.
?. is similar, but makes it so that no exception is thrown if the thing before the ?. operator doesn't exist. For example, here the ?. makes it so you don't see an exception even though the treenode doesn't exist.
treenode x; return x?.color;
Thanks a lot, @Matthew Gillespie
I could not find any page using '? operator' key word in manual.
I found only '?.'. Thank you again.
? and # operator are flexsim's only? or new one in C++?
# is FlexSim only, as far as I know. The ?. syntax is called optional chaining and is in other languages like JavaScript or Swift.
14 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