Skip to content

Commit a568a11

Browse files
committed
Fixes on typos, cleanup to improve parsing by other tools than texinfo
* Remove section 3.15: Predefined compilation variables, that is a duplicate of another section. * Syncronized -> synchronized * Fix duplicate section names 7.8.12.4 and 7.8.12.5 DISPLAY data-item, so that refs correctly work * Other small typos git-svn-id: svn+ssh://svn.code.sf.net/p/gnucobol/code/external-doc@5176 ed166372-6744-4ac0-a67f-bb1ae9efa102
1 parent f9156af commit a568a11

18 files changed

+66
-136
lines changed

guide/1.texi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ The reality is, however, that good programmers have been practising code re-usab
142142
GnuCOBOL is a free and open sourced COBOL compiler and runtime environment, written using the C programming language which itself is free to use and can be used in all forms including for commercial purposes - there is no restrictions. GnuCOBOL is typically distributed in source-code form, and must then be built for your computer's operating system using the system's C compiler and loader. While originally developed for the UNIX and Linux operating systems, GnuCOBOL has also been successfully built for computers running OSX (a OpenBSD implementation) and Windows utilizing the UNIX-emulation features of such tools as Cygwin and MinGW. Also see the @url{https://savannah.gnu.org/projects/gnucobol, GNU website} for more information.
143143
Pre built Implemeations for Windows can also be found at @url{https://www.arnoldtrembley.com/GnuCOBOL.htm}.
144144

145-
The MinGW approach is a personal favourite with the author of this manual because it creates a GnuCOBOL compiler and runtime library that require only a single MinGW DLL to be available for the GnuCOBOL compiler, runtime library and user programs. That DLL is freely distributable under the terms of the GNU General Public License. A MinGW build of GnuCOBOL fits easily on and runs from a 128MB flash drive with no need to install any software onto the Windows computer that will be using it. Some functionality of the language, dealing with the sharing of files between concurrently executing GnuCOBOL programs and record locking on certain types of files, is sacrificed however as the underlying operating system routines needed to implement them aren't available to Windows and aren't provided by MinGW. The current version for MinGW is available at the download link along with various other platforms at the GnuCOBOL @url{ https://sourceforge.net/projects/gnucobol/files/gnu-cobol}, download website.
145+
The MinGW approach is a personal favourite with the author of this manual because it creates a GnuCOBOL compiler and runtime library that require only a single MinGW DLL to be available for the GnuCOBOL compiler, runtime library and user programs. That DLL is freely distributable under the terms of the GNU General Public License. A MinGW build of GnuCOBOL fits easily on and runs from a 128MB flash drive with no need to install any software onto the Windows computer that will be using it. Some functionality of the language, dealing with the sharing of files between concurrently executing GnuCOBOL programs and record locking on certain types of files, is sacrificed however as the underlying operating system routines needed to implement them aren't available to Windows and aren't provided by MinGW. The current version for MinGW is available at the download link along with various other platforms at the GnuCOBOL @url{https://sourceforge.net/projects/gnucobol/files/gnu-cobol}, download website.
146146

147147
GnuCOBOL has also been built as a truly native Windows application utilizing Microsoft's freely-downloadable Visual Studio Community package to provide the C compiler and linker/loader. This approach does not lend itself well to a ``portable'' distribution.
148148

guide/10.texi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,28 @@ Sticky-linkage (linkage-section items remaining allocated between invocations) i
868868

869869
@item TRUNC
870870
Numeric data items are truncated according to their @code{PICTURE} clauses.
871+
872+
While still supported, this may well be removed in the future and should not be
873+
used. See @code{GCCOMP} and @code{GNUCOBOL} instead:
874+
875+
@item OCCOMP
876+
The size of a @code{COMP} @var{item} is determined according to the GnuCOBOL scheme, where for a @code{PICTURE} of length:
877+
@table @asis
878+
@item 1 - 2
879+
@var{item} = 1 byte
880+
881+
@item 3 - 4
882+
@var{item} = 2 bytes
883+
884+
@item 5 - 9
885+
@var{item} = 4 bytes
886+
887+
@item 10 - 18
888+
@var{item} = 8 bytes
889+
@end table
890+
891+
@item OPENCOBOL
892+
GnuCOBOL is compiling the source unit.
871893
@end table
872894
@comment *********************************************************************
873895
@comment ** 10.1.4 Locating Copybooks **

guide/11.texi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Arguments must be described in both the calling and called programs, and while t
363363

364364
@item @syntaxref{SIGN}
365365

366-
@item @syntaxref{SYNCRONIZED}
366+
@item @syntaxref{SYNCHRONIZED}
367367

368368
@item @syntaxref{USAGE}
369369
@end itemize

guide/2.texi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ Without specifying the environment variable COB_LEGACY = 1, will give you, what
655655
1. Using FOREGROUND-COLOR and a color code from 8 to 15: the character will be HIGHLIGHT (and that is the new color).
656656

657657
2. Using BACKGROUND-COLOR and a color code from 8 to 15: the character will be the corresponding color coded from 0 to 7 and BLINK. (the character flashes on the screen)
658+
658659
With specifying the parameter COB_LEGACY = 1 will give you what follows:
659660

660661
3 Using FOREGROUND-COLOR and a color code from 8 to 15: the foreground character will be the new color.
@@ -1053,7 +1054,8 @@ Literals are constant values that will not change during the execution of a prog
10531054
@comment *********************************************************************
10541055
@comment ** 2.1.19.1 Numeric Literals **
10551056
@comment *********************************************************************
1056-
@newunit{2.1.19.1,Numeric Literals}A numeric literal
1057+
@newunit{2.1.19.1,Numeric Literals}
1058+
A numeric literal
10571059
@idx{Literals (Numeric)}
10581060
@itemize @bullet
10591061
@item

guide/3.texi

Lines changed: 1 addition & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ The compiler command-line option @option{-D} offers additional control (@pxref{c
3030
* 3.12: >>LISTING.
3131
* 3.13: >>LEAP-SECONDS.
3232
* 3.14: $ Directives.
33-
* 3.15: Predefined compilation variables.
3433
@end menu
3534
@comment *********************************************************************
3635
@comment ** 3.1 >>CALL-CONVENTION **
@@ -339,7 +338,7 @@ The remaining options of the @directive{>>SET} provide equivalent functionality
339338
@code{>>SOURCE FORMAT IS FREE}
340339

341340
@item >>SET SOURCEFORMAT AS VARIABLE
342-
@code{>>SOURCE FORMAT IS }
341+
@code{>>SOURCE FORMAT IS VARIABLE}
343342

344343
@item >>SET SOURCEFORMAT AS XOPEN
345344
@code{>>SOURCE FORMAT IS XOPEN}
@@ -475,101 +474,6 @@ Allows for more than 60 seconds per minute.
475474
@newsection{3.14,$ Directives}
476475
@diagram{CDF $ Directive,CDF-DOLLAR,CDF-DOLLAR,None}
477476
Offers support for MF Compiler Directives.
478-
@comment ********************************************************************
479-
@comment ** 3.15 Predefined Compilation Variables (taken from grammar doc) **
480-
@comment ********************************************************************
481-
@page
482-
@newsection{3.15,Predefined compilation variables}
483-
GnuCOBOL defines @dfn{compilation variables} when various conditions are true.
484-
If the condition associated with a variable is false, the variable is not defined.
485-
@table @code
486-
@item DEBUG
487-
The -d debug flag is specified.
488-
489-
@item EXECUTABLE
490-
Module being compiled contains the main program.
491-
492-
@item GCCOMP
493-
The size of a @code{COMP} @var{item} is determined according to the GnuCOBOL scheme where for a picture of length:
494-
@table @asis
495-
@item 1 - 2
496-
@var{item} = 1 byte
497-
498-
@item 3 - 4
499-
@var{item} = 2 bytes
500-
501-
@item 5 - 9
502-
@var{item} = 4 bytes
503-
504-
@item 10 - 18
505-
@var{item} = 8 bytes
506-
@end table
507-
508-
@item GNUCOBOL
509-
GnuCOBOL is compiling the source unit.
510-
511-
@item HOSTSIGNS
512-
A signed packed decimal item's value may be considered @code{NUMERIC} if sign = @code{X"F"}.
513-
514-
@item IBMCOMP
515-
The size of a COMP @var{item} is determined according to the IBM scheme, where for a @code{PICTURE} of length:
516-
@table @asis
517-
@item 1 - 4
518-
@var{item} = 2 bytes
519-
520-
@item 5 - 9
521-
@var{item} = 4 bytes
522-
523-
@item 10 - 18
524-
@var{item} = 8 bytes
525-
@end table
526-
527-
@item MODULE
528-
The element being compiled does not contain the main program.
529-
530-
@item NOHOSTSIGNS
531-
A signed packed decimal item's value may @i{not} be considered @code{NUMERIC} if sign = @code{X"F"}.
532-
533-
@item NOIBMCOMP
534-
The size of a @code{COMP} item is @i{not} determined according to the IBM scheme.
535-
536-
@item NOSTICKY-LINKAGE
537-
Sticky linkage (linkage section items remaining allocated between invocations) is @i{not} active.
538-
539-
@item NOTRUNC
540-
Numeric data items are truncated according to their internal representation.
541-
542-
@item P64
543-
Pointers are greater than 32 bits.
544-
545-
@item STICKY-LINKAGE
546-
Sticky linkage (linkage section items remaining allocated between invocations) is active.
547-
548-
@item TRUNC
549-
Numeric data items are truncated according to their @code{PICTURE} clauses.
550-
551-
While still supported, this may well be removed in the future and should not be
552-
used. See @code{GCCOMP} and @code{GNUCOBOL} instead:
553-
554-
@item OCCOMP
555-
The size of a @code{COMP} @var{item} is determined according to the GnuCOBOL scheme, where for a @code{PICTURE} of length:
556-
@table @asis
557-
@item 1 - 2
558-
@var{item} = 1 byte
559-
560-
@item 3 - 4
561-
@var{item} = 2 bytes
562-
563-
@item 5 - 9
564-
@var{item} = 4 bytes
565-
566-
@item 10 - 18
567-
@var{item} = 8 bytes
568-
@end table
569-
570-
@item OPENCOBOL
571-
GnuCOBOL is compiling the source unit.
572-
@end table
573477
@iftex
574478
@sp 3
575479
@center ------------------------------------------------------------

guide/6.texi

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ Every sort file description (@code{SD} or @code{FD}) must be followed by at leas
249249
The reserved words @code{BY}, @code{IS}, @code{KEY}, @code{ON} and @code{WHEN} are optional and may be included, or not, at the discretion of the programmer. The presence or absence of these words has no effect upon the program.
250250

251251
@item
252-
The reserved words @code{SYNCRONIZED} and @code{SYNCRONISED} are interchangeable. Both may be abbreviated to @code{SYNC}.
252+
The reserved words @code{SYNCHRONIZED} and @code{SYNCHRONISED} are interchangeable. Both may be abbreviated to @code{SYNC}.
253253

254254
@item
255255
The reserved word @code{PICTURE} may be abbreviated to @code{PIC}.
@@ -304,7 +304,7 @@ The working-storage section is used to describe data items that are not part of
304304
The reserved words @code{BY}, @code{CHARACTER}, @code{IS}, @code{KEY}, @code{ON}, @code{RIGHT} (JUSTIFIED), @code{TIMES} and @code{WHEN} are optional and may be included, or not, at the discretion of the programmer. The presence or absence of these words has no effect upon the program.
305305

306306
@item
307-
The reserved words @code{SYNCRONIZED} and @code{SYNCHRONISED} are interchangeable. Both may be abbreviated as @code{SYNC}.
307+
The reserved words @code{SYNCHRONIZED} and @code{SYNCHRONISED} are interchangeable. Both may be abbreviated as @code{SYNC}.
308308

309309
@item
310310
The reserved word @code{PICTURE} may be abbreviated to @code{PIC}.
@@ -356,7 +356,7 @@ The local-storage section is similar to working-storage, but describes data with
356356
The reserved words @code{BY}, @code{CHARACTER} @code{IS}, @code{KEY}, @code{ON}, @code{RIGHT} (JUSTIFIED), @code{TIMES} and @code{WHEN} are optional and may be included, or not, at the discretion of the programmer. The presence or absence of these words has no effect upon the program.
357357

358358
@item
359-
The reserved words @code{SYNCRONIZED} and @code{SYNCHRONISED} are interchangeable. Both may be abbreviated as @code{SYNC}.
359+
The reserved words @code{SYNCHRONIZED} and @code{SYNCHRONISED} are interchangeable. Both may be abbreviated as @code{SYNC}.
360360

361361
@item
362362
The reserved word @code{PICTURE} may be abbreviated to @code{PIC}.
@@ -405,7 +405,7 @@ The linkage section describes data within a subprogram that serves as either inp
405405
The reserved words @code{BY}, @code{CHARACTER}, @code{IS}, @code{KEY}, @code{ON} and @code{WHEN} are optional and may be included, or not, at the discretion of the programmer. The presence or absence of these words has no effect upon the program.
406406

407407
@item
408-
The reserved words @code{SYNCRONIZED} and ``@code{SYNCHRONISED}'' are interchangeable. Both may be abbreviated as @code{SYNC}.
408+
The reserved words @code{SYNCHRONIZED} and ``@code{SYNCHRONISED}'' are interchangeable. Both may be abbreviated as @code{SYNC}.
409409

410410
@item
411411
The reserved word @code{PICTURE} may be abbreviated to @code{PIC}.
@@ -972,7 +972,7 @@ The intent of a 77-level item is to be able to create a stand-alone elementary d
972972
The reserved words @code{CHARACTER}, @code{IS}, @code{RIGHT} (JUSTIFIED) and @code{WHEN} are optional and may be omitted. The presence or absence of these words has no effect upon the program.
973973

974974
@item
975-
The reserved word @code{JUSTIFIED} may be abbreviated as @code{JUST}, the reserved word @code{PICTURE} may be abbreviated as @code{PIC} and the reserved words @code{SYNCRONIZED} and @code{SYNCHRONISED} may be abbreviated as @code{SYNC}.
975+
The reserved word @code{JUSTIFIED} may be abbreviated as @code{JUST}, the reserved word @code{PICTURE} may be abbreviated as @code{PIC} and the reserved words @code{SYNCHRONIZED} and @code{SYNCHRONISED} may be abbreviated as @code{SYNC}.
976976

977977
@item
978978
New programs requiring a stand-alone elementary item should be coded to use a level number of 01 rather than 77.
@@ -1107,7 +1107,7 @@ Executing the statement @code{SET @var{condition-name-1} TO FALSE} will cause @v
11071107
* 6.9.43B: SIZE.
11081108
* 6.9.44: SOURCE.
11091109
* 6.9.45: SUM.
1110-
* 6.9.46: SYNCRONIZED.
1110+
* 6.9.46: SYNCHRONIZED.
11111111
* 6.9.46B: TIME OUT
11121112
* 6.9.47: TO.
11131113
* 6.9.48: TYPE.
@@ -2745,21 +2745,21 @@ If, however, you want to reset the @code{SUM} counter only when the control foot
27452745
@end enumerate
27462746
@end enumerate
27472747
@comment *********************************************************************
2748-
@comment ** 6.9.46 SYNCRONIZED **
2748+
@comment ** 6.9.46 SYNCHRONIZED **
27492749
@comment *********************************************************************
27502750
@page
2751-
@newsubsection{6.9.46,SYNCRONIZED}
2752-
@diagram{SYNCRONIZED,DD-SYNCRONIZED,DD-SYNCRONIZED,DD-SYNC-LEFT-RIGHT}
2751+
@newsubsection{6.9.46,SYNCHRONIZED}
2752+
@diagram{SYNCHRONIZED,DD-SYNCHRONIZED,DD-SYNCHRONIZED,DD-SYNC-LEFT-RIGHT}
27532753
This syntax is valid in the following sections:
27542754
@code{FILE}, @code{WORKING-STORAGE}, @code{LOCAL-STORAGE}, @code{LINKAGE}
27552755

27562756
This optional clause optimizes the storage of binary numeric items to store them in such a manner as to make it as fast as possible for the CPU to fetch them.
27572757
@enumerate
27582758
@item
2759-
The reserved words @code{SYNCRONIZED} and @code{SYNCHRONISED} are interchangeable, and may be abbreviated as @code{SYNC}.
2759+
The reserved words @code{SYNCHRONIZED} and @code{SYNCHRONISED} are interchangeable, and may be abbreviated as @code{SYNC}.
27602760

27612761
@item
2762-
If the @code{SYNCRONIZED} clause is coded on anything but a numeric data item with a @syntaxref{USAGE} that specifies storage of data in a binary form, the @code{SYNCRONIZED} clause will be ignored.
2762+
If the @code{SYNCHRONIZED} clause is coded on anything but a numeric data item with a @syntaxref{USAGE} that specifies storage of data in a binary form, the @code{SYNCHRONIZED} clause will be ignored.
27632763

27642764
@item
27652765
Synchronization is performed (by the compiler) as follows:
@@ -2778,7 +2778,7 @@ If the binary item occupies eight bytes of storage, the binary item is allocated
27782778
@end enumerate
27792779
@end enumerate
27802780
@iftex
2781-
The following illustrates the allocation of a group of data items both without and with the @code{SYNCRONIZED} option. The grey blocks represent the unused bytes that are allocated in the Group-Item-2 structure because of the @code{SYNC} clauses.
2781+
The following illustrates the allocation of a group of data items both without and with the @code{SYNCHRONIZED} option. The grey blocks represent the unused bytes that are allocated in the Group-Item-2 structure because of the @code{SYNC} clauses.
27822782
@sp 1
27832783
@image{synchronization,6in}
27842784
@end iftex
@@ -2968,7 +2968,7 @@ Figure 2. Example Showing How TYPEDEF and TYPE Clauses Can Be Used
29682968
@end example
29692969
@end enumerate
29702970
This syntax is valid in the following sections:
2971-
@code {REPORT}
2971+
@code{REPORT}
29722972

29732973
As Format 2
29742974
@enumerate
@@ -3104,12 +3104,16 @@ The following table summarizes the various USAGE specifications available in Gnu
31043104
@end multitable
31053105

31063106
@t{BINARY-C-LONG [ SIGNED ]}@*@t{~~~~~~~~~~~~~}
3107+
@multitable @columnfractions 0.05 0.4 0.55
31073108

31083109
@item Depending on the system hardware, the range is either 0 to 2^31 or 0 to 2^63.
3110+
@end multitable
31093111

31103112
@t{BINARY-C-LONG UNSIGNED}@*@t{~~~~~~~~~~~~~ ~~~~~~~~}
31113113

3114+
@multitable @columnfractions 0.05 0.4 0.55
31123115
@item Depending on the system hardware, the range is either 0 to 2^32 or 0 to 2^64. This USAGE should only be used for direct CALLs into C and otherwise should not be used (and it won't compile with any strict -std as it is a GnuCOBOL-only extension).
3116+
@end multitable
31133117

31143118

31153119
@t{BINARY-CHAR [ SIGNED ]}@*@t{~~~~~~~~~~~}

guide/7.texi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ As part of the @code{TIMES} clause of a @statementref{PERFORM}.
696696
* 7.8.12.1: DISPLAY UPON device
697697
* 7.8.12.2: DISPLAY UPON COMMAND-LINE
698698
* 7.8.12.3: DISPLAY UPON ENVIRONMENT-NAME
699-
* 7.8.12.4: DISPLAY Data-Item
699+
* 7.8.12.4: DISPLAY data-item
700700
* 7.8.12.5: DISPLAY data-item (Microsoft v1, 2)
701701
@end detailmenu
702702
* 7.8.13: DIVIDE
@@ -1475,11 +1475,11 @@ The @code{ALLOCATE} statement is used to dynamically allocate memory at run-time
14751475
The reserved words @code{INITIALIZED} and @code{INITIALISED} are interchangeable.
14761476

14771477
@item
1478-
If data-name-1 is specified, the RETURNING phrase may be omitted; otherwise, the RETURNING phrase shall be
1478+
If @var{identifier-1} is specified, the RETURNING phrase may be omitted; otherwise, the RETURNING phrase shall be
14791479
specified.
14801480

14811481
@item
1482-
If used, @var{expression-1} must be an arithmetic expression with a non-zero positive integer value and the RETURNING phrase must be specified.
1482+
If used, @var{arithmetic-expression-1} must be an arithmetic expression with a non-zero positive integer value and the RETURNING phrase must be specified.
14831483

14841484
@item
14851485
If used, @var{identifier-1} should be an 01-level item defined in working-storage or local-storage with the @syntaxref{BASED} attribute. It may be an 01 item defined in the linkage section without the @code{BASED} attribute, but using such a data item is not recommended.
@@ -1496,7 +1496,7 @@ When the @var{identifier-1} option is used in conjunction with
14961496
@syntaxidx{INITIALIZED} (or its internationalized alternative @code{INITIALISED}), the allocated memory block will be initialized as if an @syntaxrefalt{INITIALIZE @var{identifier-1} WITH FILLER ALL TO VALUE THEN TO DEFAULT,INITIALIZE} were executed.
14971497

14981498
@item
1499-
When the @code{@var{expression-1} CHARACTERS} option is used, @code{INITIALIZED} will initialize the allocated memory block to binary zeros. If @code{INITIALIZED} is not used, the initial contents of allocated memory will be left to whatever rules of memory allocation are in effect for the operating system the program is running under.
1499+
When the @code{@var{arithmetic-expression-1} CHARACTERS} option is used, @code{INITIALIZED} will initialize the allocated memory block to binary zeros. If @code{INITIALIZED} is not used, the initial contents of allocated memory will be left to whatever rules of memory allocation are in effect for the operating system the program is running under.
15001500

15011501
@item
15021502
There are two basic ways in which this statement is used. The simplest is:
@@ -1887,11 +1887,11 @@ Consider using @syntaxref{SET ENVIRONMENT} in lieu of @code{DISPLAY} to set envi
18871887
The optional @code{ON EXCEPTION} and @code{NOT ON EXCEPTION} clauses may be used to detect and react to the failure or success, respectively, of an attempt to display output to the specified item. @xref{ON EXCEPTION + NOT ON EXCEPTION}, for additional information.
18881888
@end enumerate
18891889
@comment *************************************************************
1890-
@comment ** 7.8.12.4 DISPLAY Data-Item **
1890+
@comment ** 7.8.12.4 DISPLAY data-item **
18911891
@comment *************************************************************
18921892
@page
1893-
@newunit{7.8.12.4,DISPLAY Data-Item}
1894-
@diagram{DISPLAY Data-Item,PD-DISPLAY-4,PD-DISPLAY-4,PD-DISPLAY-4}
1893+
@newunit{7.8.12.4,DISPLAY data-item}
1894+
@diagram{DISPLAY data-item,PD-DISPLAY-4,PD-DISPLAY-4,PD-DISPLAY-4}
18951895
This format of the @statement{DISPLAY} presents data onto a formatted screen.
18961896
@enumerate
18971897
@comment Syntactical Specifications:
@@ -1976,7 +1976,7 @@ When @code{DISPLAY} is used without line or column controls only one variable or
19761976
@comment ** 7.8.12.5 DISPLAY data-item (Microsoft v1, 2) **
19771977
@comment *************************************************************
19781978
@page
1979-
@newunit{7.8.12.5,DISPLAY data-item}
1979+
@newunit{7.8.12.5,DISPLAY data-item (Microsoft)}
19801980
@diagram{DISPLAY data-item,PD-DISPLAY-5,PD-DISPLAY-5,None}
19811981
This format of the @statement{DISPLAY} presents data onto a formatted screen using the Microsoft format from v1 and v2 compilers (MsDos).
19821982

0 commit comments

Comments
 (0)