MotionBASIC
TM
Error Handler
Source Code Overview
Chapter 6
Source Code
Overview
6. Source Code Overview
The source code for all MBTools Modules is written to conform with ORMEC
standards for MotionBASIC
TM
software, these standards are:
1.
All labels within a modules start with a character sequence identifying
the module to which they belong, i.e. ERR.MENU, ERR.FLTS, etc.
2.
All application specific subroutines that include code that you must
modify or create in order to use a module are prefixed with APPL. For
example: APPL.ESTOP and APPL.RESTART.
3.
The optional GOSUB statement is always included, for example:
GOSUB ERR.CODES rather than just ERR.CODES.
4.
The same names are not used for variables and program labels.
5.
The default variable type (integer) is used wherever possible.
6.
A .TMP suffix is used for temporary variables that are only required
within a single subroutine.
7.
Flags are set TRUE or FALSE, I/O points are set ON or OFF. This is
preferred over setting them to 1, 0 or -1.
8.
Conditional statements are always written using the block IF-THEN-
ELSEIF-ENDIF format, except where the in-line IF-THEN-ELSE format
adds clarity.
9.
Only one statement on each line, except where multi-statement lines
using a colon separator
add to clarity.
10.
GOTO is only used when no other alternative will work.
GN3-ERRb
page 19
Summary of Contents for MotionBASIC
Page 3: ...ii...
Page 5: ...MotionBASICTM Error Handler Table of Contents A3 Complete Program Listings 31 iv...
Page 6: ...v...
Page 8: ...vii...
Page 10: ...MotionBASICTM Error Handler Welcome THIS PAGE INTENTIONALLY LEFT BLANK page 2 GN3 ERRb...
Page 37: ...MotionBASICTM Error Handler Appendix A1 GN3 ERRb page 29...
Page 38: ...MotionBASICTM Error Handler Appendix A1 THIS PAGE INTENTIONALLY LEFT BLANK page 30 GN3 ERRb...
Page 40: ...MotionBASICTM Error Handler Appendix A2 THIS PAGE INTENTIONALLY LEFT BLANK page 32 GN3 ERRb...