Head (before)

and/or statements — Simul8 Community Forum

Head (after)

Ask the Simul8 Community

Content (before)

and/or statements

natherden82natherden82
Created at
in Community support

I'm sure this is a really simple one but I'm struggling to get the OR condition to work using "|".
Is this old syntax? It was the syntax I found in the Help file. The only way I can get it to work is to do two separate if statements at the moment, if I try to combine them as an OR statement, it doesn't work. This will get very tedious if I have multiple OR conditions.
I am on the student version, perhaps this doesn't allow for it?
i.e. I am trying
If var1 = 0 | Tank.Current Level < 1000
Block Current Routing

But this does not work despite var1 being equal to 1 and the tank having > 1000 in at the time,,,,,, nothing is routing in, despite neither condition holding (i.e. the Block current routing shouldn't apply)
However, if I split it into two if statements:
If var1 = 0
Block Current Routing
If Tank.Current Level < 1000
Block Current Routing

Routing occurs as it should as neither condition holds



Comments

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Attach file
Attach image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Content (after)