In below Image before ? there is no condition. So we don't get true or false as there is no condition before question mark "?" . Then how does still below return statement is working. How is it deciding true or false.
In below Image before ? there is no condition. So we don't get true or false as there is no condition before question mark "?" . Then how does still below return statement is working. How is it deciding true or false.
true: value != 0,or a pointer, not NULL, ...
false value == 0, NULLVAR, NULL, not existing,...
Actually, the first one should be "value != 0" :-)
I.e., false is 0 and everything that is not false is true.
12 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