using #define constants in Decision and Calculation
Posted: Sat Apr 21, 2007 10:18 pm
Hi
I've got "#define ALARM_DEBOUNCE 90" defined in the supplementary code Definitions and function declarations and I want to use ALARM_DEBOUNCE in a Calculation component as:
AlarmTimer = ALARM_DEBOUNCE
Similarly I want to use it in a Decision component:
if AlarmTimer = ALARM_TIMEOUT
This is so I don't have to enter "90" in multiple places which makes it easier to modify the alarm timout at a later date and less prone to error.
Flowcode doesn't seem to allow this, it says ALARM_TIMEOUT is an undeclared variable.
Is there any way to do this?
Thanks
Kevin
I've got "#define ALARM_DEBOUNCE 90" defined in the supplementary code Definitions and function declarations and I want to use ALARM_DEBOUNCE in a Calculation component as:
AlarmTimer = ALARM_DEBOUNCE
Similarly I want to use it in a Decision component:
if AlarmTimer = ALARM_TIMEOUT
This is so I don't have to enter "90" in multiple places which makes it easier to modify the alarm timout at a later date and less prone to error.
Flowcode doesn't seem to allow this, it says ALARM_TIMEOUT is an undeclared variable.
Is there any way to do this?
Thanks
Kevin