Jump to content

This topic is 4675 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi

I don't quite get how the 1 and 0 works in the case statement and how the if statement get the answer from the case statement. Can you help me to know how it works? Thanks.

Regards,

K.C.

Let ([

vVersion = GetAsNumber ( Get ( ApplicationVersion ) );

vLowAccept = 11.01;

vHighAccept = 11.99;

vTest = Case ( vVersion < vLowAccept or vVersion > vHighAccept; 1; 0 )

];

vTest

)

Posted

I dont know what you are trying to do here but it seems as though you are just trying to test if its version 11. Why not just test for Int ( Get ( ApplicationVersion ) ) = 11 ?

Posted

Whoever wrote the calculation is using boolean values, where 1 is "true" and 0 is "false". So the Case statement checks to see if the ApplicationVersion is within the desired range, and if so returns 1/True but otherwise returns 0/False. Note that in FMP 11 and later (possibly earlier but I don't know) you can use "True" and "False" (but unquoted) instead of 1 and 0.

This topic is 4675 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.