lurker
- 15th September 2012, 03:29
PBP version: 2.45A
I'm failing to see something obvious, apparently.
The intended behavior of the following code fragment is that the ELSE should associate with the first indented IF. Instead, it is being associated with the first non-indented IF.
IF fsmState = idleSt THEN
IF kpLastValue != kpValue THEN
hserout[CR, LF, "***DEBUG - idleSt, br: mainMenuSt ", CR, LF]
kpLastValue = kpValue
fsmNextState = mainMenuSt
ENDIF
ELSE
hserout[CR, LF, "***DEBUG - drawIdle check ", CR, LF]
IF sec != lineSecondsLast THEN
gosub drawIdle
lineSecondsLast = sec
lineMinutesLast = minute
lineHoursLast = hour
lineDayLast = day
lineMonthLast = month
lineYearLast = year
lineCenturyLast = century
ENDIF
ENDIF
How does one formulate the syntax to achieve the desired behavior?
Thanks-Dan
I'm failing to see something obvious, apparently.
The intended behavior of the following code fragment is that the ELSE should associate with the first indented IF. Instead, it is being associated with the first non-indented IF.
IF fsmState = idleSt THEN
IF kpLastValue != kpValue THEN
hserout[CR, LF, "***DEBUG - idleSt, br: mainMenuSt ", CR, LF]
kpLastValue = kpValue
fsmNextState = mainMenuSt
ENDIF
ELSE
hserout[CR, LF, "***DEBUG - drawIdle check ", CR, LF]
IF sec != lineSecondsLast THEN
gosub drawIdle
lineSecondsLast = sec
lineMinutesLast = minute
lineHoursLast = hour
lineDayLast = day
lineMonthLast = month
lineYearLast = year
lineCenturyLast = century
ENDIF
ENDIF
How does one formulate the syntax to achieve the desired behavior?
Thanks-Dan