gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Small addition for OpenCOBOL Programmers Guide


From: Fred Mobach
Subject: Re: [open-cobol-list] Small addition for OpenCOBOL Programmers Guide
Date: Wed, 11 Apr 2012 09:56:22 +0100
User-agent: KMail/1.9.10

On Tuesday 10 April 2012 21:25:38 vince wrote:
> On Tuesday 10 Apr 2012 19:28:11 Fred Mobach wrote:
> > In chapter 1.5 of OpenCOBOL Programmers Guide.pdf is noted:
> >
> > The following are special directives or characters that may be used
> > in OpenCOBOL programs to signify various things.
> > “*” in column 7            Signifies the source line is a comment.
> > This is valid only when in FIXED mode.
> >
> > What is NOT yet mentioned is that the slash character ("/") in
> > column 7 in FIXED mode is also accepted as a special character to
> > be skipped.
>
> Err, according to my passing through OC a large number of
> programs/modules from MF Workbench etc, and OC then complaining, I
> would suggest not so.
>
> '/' are not an accepted character, which is used to eject page on
> printing and as the compiler does not really produce full reporting
> (other than via the -P flag) it would not get used so sounds
> reasonable that it is not liked :)
>
> Also the MF other printer control tags, as far as I know also not
> liked (migration was too long ago).
>
> However certain aspects of the $IF, $ELSE & $END are accepted
> although I do seem to get some mixed results.

The MF compiler is unknown to me, but I stumbled upon this behavior of 
openCOBOL during a migration of sources previously used in 
Siemens/Bull/IBL environments. As most of the source works as expected 
I won't blame openCOBOL for accepting the slash, just enjoy being 
surprised. 

To make a simple check possible the openCOBOL version and the test 
source are below.

address@hidden:~/cob/tests> cobc -m -W retcode.cob
address@hidden:~/cob/tests> cat retcode.cob
       identification division.
       program-id. x.
       environment division.
       data division.
       working-storage section.
       01  ws-variables.
           03  returncode            pic s9(12) comp sync value -11.
      /
       procedure division.
       mainline section.
       p00.
           move 21 to return-code
           display "return-code=" return-code end-display
               .
       peos.
           stop run.
address@hidden:~/cob/tests> cobc --version
cobc (OpenCOBOL) 1.1.0
Copyright (C) 2001-2009 Keisuke Nishida / Roger While
Built    Feb 19 2012 22:24:40
Packaged Feb 06 2009 10:30:55 CET
address@hidden:~/cob/tests>
-- 
Fred Mobach
website : https://fred.mobach.nl
 .... In God we trust ....
 .. The rest we monitor ..


reply via email to

[Prev in Thread] Current Thread [Next in Thread]