forlang.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
$TRUNCATE and $NOTRUNATE
                                             Up Contents Index Back
─────$TRUNCATE and $NOTRUNATE───────────────────────────────────────────────
 
     Action
 
     $TRUNCATE truncates all variable and program/subprogram names to
     six characters.
 
     $NOTRUNCATE disables $TRUNCATE and restores the default of 31
     significant characters in names.
 
     Syntax  $[NO]TRUNCATE
 
     Remarks
 
     When $TRUNCATE is in effect, only the first six characters of a
     name are significant. For example, VARIABLE, VARIABLEA, and VARIAB
     are all treated as the same identifier.
 
     When $TRUNCATE or $STRICT is in effect, names longer than six
     characters generate warning messages. This can make it easier to
     port your code to other systems.
 
     The $[NO]TRUNCATE metacommand is equivalent to the /4{Y | N}t
     compiler option.
 
     Example
 
     C     This program produces the following output:
     C
     C     74 Las Vegas Street
     C     74 Las Vegas Street
     C
     C     Barry Floyd
     C     3 Prospect Drive
 
           IMPLICIT CHARACTER*20 (s)
 
     $TRUNCATE
     C     'studentname' and 'studentaddress' are treated as 'studen'
           studentname    = 'Enrique Pieras'
           studentaddress = '74 Las Vegas Street'
 
           WRITE (*, 100) studentname, studentaddress
 
     $NOTRUNCATE
     C     'studentname' and 'studentaddress' are treated as different
     C     identifiers distinct from 'studen'
           studentname    = 'Barry Floyd'
           studentaddress = '3 Prospect Drive'
 
           WRITE (*, 100) studentname, studentaddress
 
       100 FORMAT (/ 1X, A20, / 1X, A20)
 
           END
                                    -♦-