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

Re: [GNU-COBOL] New to list




> > That means that
> >         15  MY-VAR1         COMP SYNC   PIC 999..
> > would be valid, but
> >         15  MY-VAR1         PIC 999.   COMP SYNC.
> > would not be.  Why would you want to do that?  I don't know, but
> > them's the rules.
> 
> The reason appears to be that in the second case it is not clear
> whether the first fullstop is part of the picture of an end of
> sentence type fullstop. Not having the picture in quotes causes
> all sorts of problems for compilers.

I can see that point, yes.  But why would you want to specify a decimal
point at the right of the PIC when it's pretty much implicit there by
default?

> >  I'm not sure
> > that the storage of 5 digit values in a variable declared as 9(4) is
> > "standard" COBOL.
> >
> As I read the standard the results are undefined. IBM has a
> trunc(bin) option to control what happens (from memory).

Interesting; I wasn't aware of that.

-- 
David R. Ondrejko - EDI/Referral - Safelite Glass Co.
 Mathematician by training - Programmer by trade - Philosopher by nature
 Genius by genetics - Atheist by conviction - Hedonist by desire!

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.