Help with how to make definitions in FC

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

Moderator: Benj

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Help with how to make definitions in FC

Post by QMESAR »

Hi All,

Please help me understand the most easy way to do the following in FC,

In C I can do this

Code: Select all

#define  INITSTATE    1
#define  RUNSTATE    2
#define  ERRORSATE  3

then in some were in the code I can load this definition to a Varaible which is used to select the case of my case structure(Statemachine) 

MachineState = RUN 

Then in the case structure 
Switch (MachineState ) 
  and so on 


How can I do this definitions in FC? :D

much appreciated
Attachments
1.JPG
1.JPG (14.85 KiB) Viewed 3217 times

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times

Re: help with how to make definitions in FC

Post by kersing »

In the project explorer create constants in the globals section.
constants-def.PNG
(2.67 KiB) Downloaded 1819 times
Now you can select them in the switch:
constants.PNG
(10.29 KiB) Downloaded 1819 times
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: help with how to make definitions in FC

Post by QMESAR »

Thank you very much Kersing this really helps me a whole lot :D
Really appreciate your help

Post Reply