Add "Else If" to Decision Block

Moderator: Benj

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

Add "Else If" to Decision Block

Postby ngmflowcode » Wed Feb 13, 2013 9:28 pm

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

Postby brandonb » Fri Feb 22, 2013 2:12 am

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 2962 times
These users thanked the author brandonb for the post (total 3):
kersing (Fri Feb 22, 2013 9:55 am) • dazz (Fri Feb 22, 2013 1:15 pm) • medelec35 (Fri Feb 22, 2013 2:08 pm)
Rating: 15.79%
 

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8376
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2384 times
Been thanked: 3411 times
Contact:

Re: Add "Else If" to Decision Block

Postby medelec35 » Fri Feb 22, 2013 2:12 pm

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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.