User Guide

Appendix
122
Axcess Programming Language
16. No line should extend beyond the edge of the screen, and multi-line commands should be
aligned.
Not recommended:
IF(SYSTEM_POWER AND(SYSTEM_POWER AND([INPUT,TV_POWER]OR IN |
CALL 'CHANGE CHANNEL' (TUNER,CHANNEL) |
[TP,169]=SYTEM_POWER AND ([INPUT,TV_POWER] OR [(INPUT,VCR_|
Standard:
IF(SYSTEM_POWER AND (SYSTEM_POWER AND ([INPUT,TV_POWER] OR |
INPUT,VCR_POWER]))) |
CALL 'CHANGE CHANNEL' (TUNER,CHANNEL) |
[TP,169] = SYTEM_POWER AND ([INPUT,TV_POWER] OR |
[INPUT,VCR_POWER])
17. PUSH statements should all have comments indicating which button on the panel uses the
command.
Not recommended:
PUSH[TP,25]
TO [RELAY,3]
Standard:
PUSH[TP,25] (* LIGHTS OFF *)
TO [LIGHTS,LIGHTS_OFF]
18. Many programmers choose to assign more descriptive names in DEFINE_CONSTANT, rather
than to simply use channel numbers.
Standard:
DEFINE_CONSTANT
PLAY = 1
STOP = 2
PAUSE = 3
FFWD = 4
REW = 5
REC = 8
19. Make sure the names given to variables and are indicative of their usage.
20. Using descriptive names can sometimes be an acceptable alternative to adding comments.
Standard:
PUSH[SWP,8]
TO [RELAY_3,1] (* CASSETTE DECK #1 PLAY *)
Also correct:
PUSH[SWP,8]
TO [CASS_1,CASS_PLAY]
21. Similar sections of code should be kept together and commented as such.
If you choose not to use descriptive names for constants you must comment your
code!