question

Francesco V2 avatar image
0 Likes"
Francesco V2 asked Francesco V2 commented

How to use IF-ELSE condition and a proper use of brackets?!

file-funzionante-base-difettoso.fsm

Hello, I would like some advice on how to use the if-else condition. I have wrotten the code of the alghorithm that I have attached.

When I use the only IF declaration the alghorithm work without problem but when I add the else condition, I have an error that declare that I didn't use the brackets in a proper way. I have checked many times but maybe I have some problem on how to use the IF-ELSE condition.

Thank you

Francesco

FlexSim 19.2.0
if-else condition
· 1
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

anthony.johnson avatar image
2 Likes"
anthony.johnson answered Francesco V2 commented

The following code is wrong:

  1. else (solape> fracrepetidos2)

A straight else statement cannot have a condition. If you want a condition on the else, it should be an else if:

  1. else if (solape > fracrepetidos2)
· 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.