what is the syntax for Oring and anding in Flowcode loops

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
zenzehar
Posts: 21
Joined: Sat Nov 01, 2008 4:00 pm

what is the syntax for Oring and anding in Flowcode loops

Post by zenzehar »

what is the syntax for Oring and anding in Flowcode loops ... like while(A=1 || B=1 || C=1 )... thx very much and best regards

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: what is the syntax for Oring and anding in Flowcode loops

Post by Steve »

The terms "OR", "AND", etc. refer to bitwise operations (i.e. the equivalent of a single | or & in C). Flowcode uses || for logical "or" and && for logical "and".

So you are correct, but you may need to have brackets:

Code: Select all

(A=1) || (B=1) || (C=1)

Post Reply