bug-gnucobol
[Top][All Lists]
Advanced

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

Re: libcob codegen error


From: Michael D. Setzer II
Subject: Re: libcob codegen error
Date: Thu, 22 Jul 2021 22:21:47 +1000

On 22 Jul 2021 at 12:15, mattila_timo@kolumbus.fi 
wrote:

Date sent:      Thu, 22 Jul 2021 12:15:41 +0300
From:   mattila_timo@kolumbus.fi
To:     bug-gnucobol@gnu.org
Subject:        libcob codegen error

> Hi,
> I got error
> libcob: error: codegen error
> libcob: error: Please report this!
> 

I just compiled it on my Fedora 33 system, and it seems 
to work??
cobc fnkeys.cob -x -v
cobc (GnuCOBOL) 3.1.2.0
Built     Jul 22 2021 21:59:19  Packaged  Dec 23 2020 
12:04:58 UTC
C version "10.3.1 20210422 (Red Hat 10.3.1-1)"
loading standard configuration file 'default.conf'
command line:   cobc -x -v fnkeys.cob 
preprocessing:  fnkeys.cob -> /tmp/cob27707_0.cob
return status:  0
parsing:        /tmp/cob27707_0.cob (fnkeys.cob)
return status:  0
translating:    /tmp/cob27707_0.cob -> 
/tmp/cob27707_0.c (fnkeys.cob)
executing:      gcc -c -pipe -I/usr/local/include 
-Wno-unused -fsigned-char
                -Wno-pointer-sign -o "/tmp/cob27707_0.o" 
"/tmp/cob27707_0.c"
return status:  0
executing:      gcc -Wl,--export-dynamic -o "fnkeys" 
"/tmp/cob27707_0.o"
                -L/usr/local/lib -lcob -lm
return status:  0

After compile it runs an shows 100? with the function key 
number (except some keys captured by the gnome). F1
To get it to end with the n, you have to type in 56 n??
But don't get the error.



> when playing / testing GnuCobol 3.1.2 with Micro Focus screen IO example 
> program on Linux Mint.
> 
> Source:
>         IDENTIFICATION DIVISION.
>         PROGRAM-ID.  FNKEYS.
> 
>        * This is the screen demo modified to demonstrate function keys
> 
>         ENVIRONMENT DIVISION.
>         CONFIGURATION SECTION.
>         SPECIAL-NAMES.
>             CRT STATUS IS CRT-STAT
>             CURSOR IS CURSOR-POSITION.
> 
>         DATA DIVISION.
>         WORKING-STORAGE SECTION.
> 
>         01  CURSOR-POSITION.
>             02  CURSOR-LINE         PIC 99.
>             02  CURSOR-COL          PIC 99.
> 
>         01  CRT-STAT                PIC 9999.
> 
>        * Areas to contain data from forms on the screen.
> 
>         01  GO-ON.
>             02  GO-MESSAGE          PIC X(55) VALUE
>             "Press a function key? (Press Fkey or press n to finish)".
>             02  FILLER              PIC X.
>         01  GO-ON-RED.
>             02  FILLER              PIC X(55).
>             02  GO-ON-REPLY         PIC X.
> 
>         SCREEN SECTION.
> 
>         01  FKEY-FORM.
>             03  BLANK SCREEN.
>             03  LINE 1 COLUMN 35 VALUE "Function Key".
> 
>         PROCEDURE DIVISION.
> 
>         INITIALISE-FORM.
>             MOVE SPACES TO CURSOR-POSITION.
>             DISPLAY FKEY-FORM.
> 
>         NEXT-FKEY.
>             MOVE SPACES TO GO-ON-REPLY.
>             DISPLAY GO-ON AT 2401.
>             ACCEPT GO-ON-RED AT 2401
>                 ON EXCEPTION PERFORM CRT-EXCEPTION
>             END-ACCEPT.
>             IF GO-ON-REPLY = "y" OR "Y" GO TO INITIALISE-FORM.
>             IF GO-ON-REPLY = "n" OR "N" STOP RUN.
>             GO TO NEXT-FKEY.
> 
>         CRT-EXCEPTION.
>             DISPLAY CRT-STAT AT 0170.
>             MOVE SPACE TO GO-ON-REPLY.
> 
> 
> Details in attached to text document. No matter if parameter 
> "standard-define" has value zero or 1 in file config file "default.conf"
> 
> BR
> Timo Mattila
> 





reply via email to

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