gnucobol-users
[Top][All Lists]
Advanced

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

Re: [open-cobol-list] invalid VALUE clause


From: Thomas Biehler
Subject: Re: [open-cobol-list] invalid VALUE clause
Date: Tue Feb 17 02:43:12 2004
User-agent: KMail/1.4.3

On Tuesday 17 February 2004 10:52, William M. Klein wrote:
> You are correct that numeric-edited items must have alphanumeric literals
> in their value clause (and I was in error).  There is a "relevant note" on
> page 370 of the 2002 Standard which says,

if you would gives the reference to the NOTE in form of: 
   ISO/IEC 1989: 2002
   13.16.61.2 (8) 
it would be faster to find

>
> "NOTE The programmer is responsible for specifying the numeric-edited, or
> national-edited item in edited form."
>
> But as that is ONLY a note, the compiler certainly is not required to
> "restrict" VALUE clauses to those that match the picture clause.
>

This NOTE refers only to
   ISO/IEC 1989: 2002
   13.16.61.2 (8)   
and nothing else! 

That means IMO :  
(a example for the rule / NOTE above)

Definition:       VALUE-Clause:       VALUE in memory after initialization:
======================================================                  
   PIC ZZ9      VALUE "004"    -->  "004" (no editing, here no zero to blank!)
= the compiler checks the VALUE is valid and if so it  takes the value
   as specified (unchanged; NO EDITING!)
  
if a programmer want "   4"  after initialization :

   PIC ZZ9      VALUE  "  4"     -->  "   4"  is needed !

That's all what the NOTE says.

Greetings

Thomas Biehler



reply via email to

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