Add "Else If" to Decision Block

Moderator: Benj

Post Reply
ngmflowcode
Posts: 12
Joined: Wed Jan 30, 2013 5:21 pm
Has thanked: 1 time
Contact:

Add "Else If" to Decision Block

Post by ngmflowcode »

Was excited to try out Flowcode and was disappointed to see no "Else If" equivalent in the Decision block. I don't know how Flowcode is built but I would hope this is a relatively non complicated feature to add. Right now, one needs to use multiple Decisions daisy chained after one another which is actually more complicated then hand coding it in C.

-NGM

brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times
Contact:

Re: Add "Else If" to Decision Block

Post by brandonb »

just pointing out, code below is same as flowchart

Code: Select all

while(1)
{
   if(up==1){
     }
    else if(down==1){
      }
      else if(flow==1){
      }
       else if(stop==1){
      }
}
Attachments
else if.jpg
else if.jpg (29.28 KiB) Viewed 7445 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Add "Else If" to Decision Block

Post by medelec35 »

I totally agree with Brandon.
More complex decisions can be made in dicision branches e.g in one of my flowcharts I have:

Code: Select all

((Tstat >= 350) && (Summer_Vent = 0) && (Switch_Live_Det = 1) && (Tstat < 1010) && Pipe_Sense >= 10) || ((Fan_On = 1) && (Summer_Vent = 0) && (Tstat < 10))
Martin

Post Reply