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

Re: [GNU-COBOL] Preprocessor, GNU MP, packed decimal, clarifications



Chad Slaughter wrote:
> 
> well, then we are once agian. In total agreement.
> Save, for literal strings...just encode them in hex...adn the
> compiler shouldnt care. Only the runtime system.

ANSI 95 will have hex strings like this:
 01   filler pic x(10) value X"0102030405060708090a".
Perhaps you could combine them with string pasting eg
"123\n456" 
--> "123" & x"0a" & "456".
Your version 1 supported string pasting so this may be the best answer. 
It's not solely a migration issue in that I may actually want to put
a newline in a string (sorry, should read 'non-numeric literal').

> Now, if we wish to create a migration tool seperatly from the compiler, then
> fine.

Fair enough.

> 
> Also, I think this issue needs to be put on hold. As I dont think we ahve
> ever discussed how to go about doing a listing. Either abstractly or
> concreatly..nor even thought about how to get it into the whole compiler
> process.
> So I guess thats the next topic to discuss. =)


As you suggest this can be deferred. I will make sure my code is nice
and modular
so we can output the info however we like later on.

Here is what I plan to do in the meantime: I will put out the #line
lines initially. 
but they can be turned off. 

Additionally, if/when you send me a spec for the format of the
information file
I will create the ability to create that as well (this is the file that
passes the 
information about the original source lines from the program formerly
known
as the preprocessor and the phase II compiler. 

I think it would need to be something like 

"array of [byte offset in file, input file name, input file #, input
column #].

The column number is for checking AB issues. It could be just an AB
flag, or
you could just make sure that the main output file has tokens in the
right area
A or B based on what came in from the input file. 

By the way, if you are writing to stdout, is there any easy way to find
out how many bytes
you have written?

******

Finally, two other things:

1/2, there is a package GNU MP which supports unlimited precision
integer math.
This could be an easy way to get something going (not optimal) for the
decimal
arithmetic.

But I would assume as the moment the priority is to get an correct
implementation
up and running. Later we can tune it. Is that in line with your
thinking?

2/2, format of packed decimal. Are you planning to use the Xopen spec
which is 
the same as IBM mainframe (sign in trailing nibble c+ d- f-). This would
be a little
slower than the intel native format (sign as separate byte up front).

3/2, does anyone have access to a copy of the clarifications issued by
the COBOL
committee? There are clarifications 24-28 for cobol 85. See at the end
for details.
The cost to me in Australia would be about $US40 per copy. It may be
cheaper in the 
US. If someone would like to give the company a call and find out the 
price for US customers, I might be able to have a copy sent to one of
the team,
who could then have a look and then mail them on to me (the cost of 
overnight delivery to here, which GES insists on, is prohibitive).

****

I will be doing some more coding on the weekend so I should have a
functional 
phase I (preprocessor) real soon now.

Regards,
Tim Josling


Announcement of COBOL Clarifications.
*************************************

NCITS (National Committee for Information Technology Standards) 

NEWS RELEASE 

Doc. No.: PR/97-137
Reply to: Deborah J. Donovan at ddonovan@itic.nw.dc.us 

NCITS Announces the Availability of COBOL Information Bulletin #28 

Washington D.C., October 1997 - NCITS Announces the Availability
 of COBOL Information Bulletin #28 (CIB-28) 

COBOL Information Bulletin #28 is issued in response to questions
 that have been raised regarding certain specifications contained in the
content of: 

ANSI X3.23-1985, Programming Language - COBOL, along with ANSI
X3.23a-1989, 
Programming Language - Intrinsic Function Module for COBOL and ANSI
X3.23b-1993,
Programming Language - Correction Amendment for COBOL. 

These interpretations were prepared by Technical Committee J4, 
which is responsible for the maintenance of that standard, 
and were authorized for release by NCITS (National
Committee for Information Technology Standards) in order to 
provide clarifications as quickly as possible in response to questions
raised. 

These interpretations, while reflecting the technical opinion 
of the committee responsible for maintaining the standard, are 
intended solely as supplementary information to users of the
standard. The standard is not altered by the issuance of these
interpretations. Any subsequent revision, erratum, amendment,
or interpretation to the standard may or may not reflect the
contents of these interpretations. 

Copies of CIB #28 can be purchased from Global Engineering Documents,
Inc.,
 15 Inverness Way East, Englewood, CO 80112-5704, 1-800-854- 7179 or
303-792-2181.

NCITS Secretariat, 1250 Eye Street, NW, Suite 200, Washington, DC 20005, 
Email: NCITS@itic.nw.dc.us

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