bug-gnucobol
[Top][All Lists]
Advanced

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

Re: GnuCOBOL 3.1.2 - Compilation fails when more than one Function is li


From: Simon Sobisch
Subject: Re: GnuCOBOL 3.1.2 - Compilation fails when more than one Function is listed in Repository
Date: Tue, 31 May 2022 23:07:08 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

Looks to me like there is a period to much, shouldn't it be:

         repository.
            function fn1
            function fn2.

?

Am 31.05.2022 um 18:21 schrieb Marty Heyman:
Please see:

        id division.
        program-id. repo-fail.
        environment division.
        configuration section.
        repository.
           function fn1.
           function fn2.

        procedure division.
        display "Hello world."
        end-program. repo-fail.

The program fails to compile with:

$ cobc -xo repo-fail repo-fail.cob
repo-fail.cob:7: error: PROCEDURE DIVISION header missing
repo-fail.cob:7: error: syntax error, unexpected intrinsic function name
repo-fail.cob:9: error: syntax error, unexpected PROCEDURE
repo-fail.cob:11: error: 'end-program' is not defined
$ vi repo-fail.cob

The program compiles correctly with the second function definition
removed or commented out. `cobc` version information:

$ cobc --version
cobc (GnuCOBOL) 3.1.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html <https://gnu.org/licenses/gpl.html>>
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch,
Edward Hart
Built     May 31 2022 11:49:28
Packaged  Dec 23 2020 12:04:58 UTC
C version "Apple LLVM 13.1.6 (clang-1316.0.21.2.5)"
$

Thanks for looking at this.

--
Marty Heyman






reply via email to

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