Labels

The compiler outputs a warning message if a label has been set but never used. Redundant labels should be removed as their presence inhibits optimisation in many cases. Labels can also often be removed by making small changes to the structure of the program, for example:

IF(I/=0) GOTO 10
A = B
C = D
10 J = I

If label 10 had not been referenced from elsewhere in the program unit, this could be rewritten more efficiently (and legibly) using a block-IF statement as follows:

IF(I==0)THEN
  A = B
  C = D
ENDIF
J = I

The extra efficiency would derive from the fact that the compiler 'remembers' that it has I in a register when it compiles the statement J=I.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited