Symbolic variables

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
jadiflow
Flowcode v5 User
Posts: 273
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 19 times
Been thanked: 16 times

Symbolic variables

Post by jadiflow »

Hi,

Is it possible to attach symbolic variable definitions and call them out in the code?

Like I would have a signal 'Sel' attached to say pin RA1. I would have a 'define Sel RA1' perhaps as supplemental code, and then in my flowchart would say something like 'SelState=Sel'
Big advantage is to have all definitions in one place for easy modifications and debugging. In the current situation if I am porting a program to another PIC with different pin connections I need to go through each and every statement block and chance the pin assignments.

Also, I remember reading that it should be possible to attache a notepage to a flowchart with engineering info but can't find it back. Was I dreaming ? ;-)

thanks,

Jan Didden
Linear Audio

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

Re: Symbolic variables

Post by Steve »

The "notepage" suggestion was on the list for v4, but did not make the final version.

Your suggestion about some kind of global reference for an i/o element is a great one and I'll make a note of it - but it will be v5 at the earliest.

jadiflow
Flowcode v5 User
Posts: 273
Joined: Thu Apr 17, 2008 9:59 am
Has thanked: 19 times
Been thanked: 16 times

Re: Symbolic variables

Post by jadiflow »

Thanks Steve.

You could even take it a step further so that whenever I use symbolic variable 'Sel' (which is defined as 'RA1') the code would automagically include either a read or write from/to that pin. More isolation between the flowchart and the code.

Example: 'define Sel RA1' in supplementary code or wherever.

Then in my flowchart I say: BlaBla = Sel >> 1
The code would say: Sel = RA1; BlaBla = Sel >> 1

Or if my flowchart would say: Sel = junk AND 0b00000001
The code would say: Sel = junk AND 0b00000001; RA1 = Sel

I don't think you would need to explicitly define Sel as either an input or an output, but I may overlook something. Over to you.

jan didden

Post Reply