question

Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst asked Joerg Vogel answered

Bug in getting value from table in ternary operator

Hi All,

I have found a bug in the ternary operator in combination with the table class. If you have the following code you get an exception when it is executed.

  1. Table table = Table( "GlobalTable1");
  2. double x = table[ 1 ][ 1 ] == 0 ? 1 : ( table[ 1 ][ 1 ] );
  3.  
  4.  
  5. Flexscript Error VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/ToolTabPane/TabControl/ScriptConsole/Script>script Line 2
  6. Invalid cast from int to TableElement
  7. Could not finish parsing because of previous errors.

Could you maybe fix this in the next release?

Thanks,

Patrick

FlexSim 18.0.1
tableternary operator
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

if you explicitly cast the false instruction as a number value, there isn't a bug.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.