gnucobol-users
[Top][All Lists]
Advanced

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

[open-cobol-list] Re: feature request: some Micro Focus "dialect" extens


From: Keisuke Nishida
Subject: [open-cobol-list] Re: feature request: some Micro Focus "dialect" extensions
Date: Sun Nov 16 03:18:10 2003
User-agent: Wanderlust/2.10.0 (Venus) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryƍmae) APEL/10.3 Emacs/21.2 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI)

At Fri, 14 Nov 2003 16:39:26 +0100,
Thomas Biehler wrote:
> 
> i would like to see some extensions from Micro Focus Compiler 
> to be implemented with appropriate compiler configuration.
> (somewhat of saying "Language-dialect = MF-Cobol")

You can do it by the compiler option "-std=mf".  There is a
configuration file "config/mf.conf" for the compatibility
with MF COBOL.

> I have attached a demo-program MFEXTENSIONS.cob with
> "explaining comments" before the extensions.

Thanks.  A sample program like this is very helpful.

>       * "ID" = useless abbreviation ;-)
>        ID               DIVISION.
>       *IDENTIFICATION   DIVISION.

This already works.

>       * a empty FILE-CONTROL entry is only optional since 2002 Standard
>       * MF COBOL makes it optional also with 1985 Language Level
>        FILE-CONTROL.
>       * a missing FILE-CONTROL entry ...

This already works as well.

>       *  OCCURS  at Level 01 !   conforms NOT to 1985 / 2002 !
>        01 TABELLE    PIC X          OCCURS 5.

OK, let's accept it with -std=mf, but probably it should be
rejected by the default mode.

>       *  USAGE COMP-X  (similar to BINARY)
>        01  BIN-FIELD           PIC XX   USAGE COMP-X.
>       * = BIG-ENDIAN !!!!! , 2 BYTES (COMP-X = PIC XX ! allowed 
>       *   ; PIC 9(4) possible   (if PIC X(n) ==>  "X"(n)=> "Bytes"(n))
>       * no DECIMAL TRUNCATION (usage all 'Bits') 
>       * (maximum is 18 Digits (PIC 9(18) or 9 Bytes = PIC X(9)))
>       *
>       * the meaning of the previuos defininiton is nearly equal 
>       * to the following : (if the implementor of "BINARY" decides: )
>       * Byte-Order:             BIG-ENDIAN
>       * Representation of SIGN: unsigned  ( is this possible ?! )
>        01  BIN-FIELD-STANDARD  PIC 9(4) USAGE BINARY.

Numeric data items of USAGE BINARY is now big endian in the CVS
version.  Sign should be handled properly.  There is a "decimal
truncation" problem that I notice.  The current implementation is
not compatible with MF COBOL.  I will fix it as soon as possible.

I haven't implemented COMP-X yet.  I'll do it soon.

>       * a single point  (empty entry)
>        .

Let's accept it.

>       *  OPERATOR <> :  NOT EQUAL / NOT = in 1985 / 2002 Standard
>            IF "2" <> "1"
>              THEN CONTINUE
>            END-IF.

Let's accept it with -std=mf.

>       *  a counting loop with empty perform body ... 
>       * = Imperative statement missing
>            PERFORM 
>              VARYING I  FROM 1 BY 1
>               UNTIL I > 3
>       *    empty inline-perform  body  (solution: "CONTINUE")
>       *       CONTINUE 
>            END-PERFORM.

Let's accept it, but it might be better to show a warning
as the default behavior.

Keisuke


reply via email to

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