Touch Technologies, Inc.
Coding Standards

Contents


Begin Index


Contents (summary)
Preface Preface
Chapter 1 Coding Standards for New Code
Chapter 2 Routine Naming Convention Standards
Chapter 3 Standards for New Programs and Source Code Changes
Chapter 4 Channel Numbers
Chapter 5 Keystrokes for Professional Software Development
Appendix A Coding Principles and Standards
Appendix B Coding Standards Checklist
  Index
  Examples
  Tables
Preface
Preface Preface
Chapter 1
1 Coding Standards for New Code
     1.1     Format of Programs and Routines
         1.1.1         Program Header
         1.1.2         Initialization Format
         1.1.3         Main Logic Area Format
         1.1.4         Routine Format
         1.1.5         Routine Header Format
         1.1.6         Routine Name and Body
         1.1.7         Routine Coding Rules
     1.2     Coding Rules
         1.2.1         Debug Coding Rules
         1.2.2         Indentation
         1.2.3         Loops
Chapter 2
2 Routine Naming Convention Standards
     2.1     Naming Conventions
     2.2     Standard Naming Prefixes
Chapter 3
3 Standards for New Programs and Source Code Changes
     3.1     Program Headers
     3.2     Comments
     3.3     Copied Code
     3.4     Error Handling Routines
     3.5     Important Constants
Chapter 4
4 Channel Numbers
     4.1     Using Channel Variable Names
Chapter 5
5 Keystrokes for Professional Software Development
     5.1     GOLD/P Program Template
     5.2     GOLD/R Routine Header Template Keystroke
     5.3     GOLD/R to Create Subroutines
     5.4     GOLD/O to Organize Routines
     5.5     GOLD/A to Align Equal Signs "="
     5.6     GOLD/C to Insert Debug Comment Line
     5.7     GOLD/D to Document Routine Variables
     5.8     GOLD/F to Fixup Right Margin
     5.9     GOLD / (Forward Slash) to Comment or Uncomment
     5.10     GOLD/DOWN and UP Arrow to Change Case
     5.11     Tab Key to Indent
     5.12     Shift + Tab to Reverse Indent
     5.13     Keystrokes for Professional Software Development Summary
Appendix A
Appendix A Coding Principles and Standards
Appendix B
Appendix B Coding Standards Checklist
Index
Index
Examples
1-1 Program Outline Format
1-2 Optional Program Format Outline
1-3 Program Header Format
1-4 Initialization Area
1-5 Main Logic Area
1-6 Routine Format
1-7 Correctly Formatted Routine
1-8 Sample Routine Header
1-9 Routine Name and Body
1-10 Keeping Routine Logic Simple
1-11 Order of Routines
1-12 Routine Length
1-13 Long Routine
1-14 Smaller Routines
1-15 Commenting Long Routines
1-16 Writing Code in Lower Case
1-17 Variable Names
1-18 SheerPower Internal Variables
1-19 Lining Up " =" Signs in Routines
1-20 Debug Code
1-21 Debug Code
1-22 Debug Code
1-23 Code Indentation
1-24 IF THEN Statement Spacing and Indentation
1-25 IF THEN Format
1-26 IF THEN Format with Multiple Conditions
1-27 Code Block Indentation
1-28 Continuation Indentation
1-29 FOR NEXT Loop Indentation
1-30 Use of Parentheses
1-31 Variable Names
1-32 Short Lines of Code
1-33 Temporary Variables as Single Letters
1-34 Underscores as Separators
2-1 ASK_ Prefix
2-2 CALC_ Prefix
2-3 DO_ Prefix
2-4 ENTER_ Prefix
2-5 GET_ Prefix
2-6 OPEN_ Prefix
2-7 PRINT_ Prefix
2-8 SHOW_ Prefix
2-9 STORE_ Prefix
2-10 INITIALIZE_ Prefix
3-1 Program Header Format
3-2 Modification Documentation
3-3 Changed or Added Code
3-4 Error Messages
3-5 Storing Critical Numbers into Variables
4-1 Using Channel Variable Names
5-1 GOLD/P to Create Program Template
5-2 GOLD/R to Create Routine Template
5-3 GOLD/R to Create Subroutine
5-4 GOLD/A to Align Equal Signs " ="
5-5 Aligning " =" in Code
5-6 GOLD/C to Generate Debug Comment
5-7 GOLD/D to Document Routine Variables
5-8 Documented Variables with GOLD/D
5-9 GOLD/F to Wrap Long Lines of Code
5-10 GOLD / Keystroke to Comment
5-11 Comment and Uncomment Code Simultaneously
5-12 GOLD/DOWN and UP Arrow for Changing Case
5-13 TAB Key for Indentation
5-14 Shift + Tab Key to Reverse Indent


Previous Next Contents Index