WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WinBatch
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Windows Interface Language Coding Standard

Your code should meet the following coding standard. It is a recommendation, not a requirement. Clarity, simplicity and organization are the goals.


Structure

Overall program structure is as follows:


Documentation

The program should have a header block containing:

;****************************************************************
;*                     PROGRAM NAME
;*
;* Purpose : 
;* Author : 
;* Inputs : 
;* Outputs : 
;* Special Instructions : 
;* Known issues : 
;* Revision History : 
;****************************************************************

Every 'User Defined Function' or 'Subroutine' should have a header block containing:

 
;----------------------------------------------------------------
; udfFunction ( parm1, parm2 )
;----------------------------------------------------------------
; description
;----------------------------------------------------------------
; parm1 : description.
; parm2 : description.
;----------------------------------------------------------------
; returns: @true if success, @false if failure
;----------------------------------------------------------------
; notes : 
;----------------------------------------------------------------

Blocks of code need short descriptions to identify their purpose. For example:

 
; fill the array with values 1,2,3,...,n
for i = 0 to n
   list[i] = i + 1
next

Inline comments should be used to clarify anything that is not immediately obvious in the code.

roll = Random(12) Mod 11 + 2 ; compute random roll of dice

White space

Should be used liberally


Indentation

WinBatch Studio can be used to help indent your code. You can highlight blocks of code then use the Tab key to indent or the Shift-Tab key to remove indents.

Be sure to tailor WinBatch Studio's Tab settings to fit your needs. You can modify the tab size using the View|Options menu and selecting the 'File types' tab.

There is a code Beautifier Script available for reformatting existing code in the tech database. After formatting your source file. Make sure to double check your code for compliancy to the coding standards.


Variables and other identifiers


Article ID:   W17640
Filename:   Coding Standard.txt
File Created: 2010:02:17:11:58:33
Last Updated: 2014:06:18:13:39:33