Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

COBOL's Influence on C
From an ISO draft technical document:
-----
ISO/IEC JTC1 SC22 WG14 N1176
Date: 2006-05-24
Reference number of document: ISO/IEC WDTR 24732
Committee identification: ISO/IEC JTC1 SC22 WG14
SC22 Secretariat: ANSI
Information Technology -
Programming languages, their environments and system software interfaces -
Extension for the programming language C to support decimal floating-point
arithmetic -
---
Even though the hardware may not provide decimal arithmetic
operations, the support can still be emulated by software.
Programming languages used for business applications either
have native decimal types (such as PL/I, COBOL, C#, or
Visual Basic) or provide decimal arithmetic libraries (such as
the BigDecimal class in Java). The arithmetic used, nowadays,
is almost invariably decimal floating-point; the COBOL 2002
ISO standard, for example, requires that all standard decimal
arithmetic calculations use 32-digit decimal floating-point.
-----



Report this thread to moderator Post Follow-up to this message
Old Post
Rick Smith
11-05-07 11:55 PM


Re: COBOL's Influence on C
On 11/05/07 11:02 am, Rick Smith wrote:
> From an ISO draft technical document:
> -----
> ISO/IEC JTC1 SC22 WG14 N1176
> Date: 2006-05-24
> Reference number of document: ISO/IEC WDTR 24732
> Committee identification: ISO/IEC JTC1 SC22 WG14
> SC22 Secretariat: ANSI
> Information Technology -
> Programming languages, their environments and system software interfaces -
> Extension for the programming language C to support decimal floating-point
> arithmetic -
> ---
> Even though the hardware may not provide decimal arithmetic
> operations, the support can still be emulated by software.
> Programming languages used for business applications either
> have native decimal types (such as PL/I, COBOL, C#, or
> Visual Basic) or provide decimal arithmetic libraries (such as
> the BigDecimal class in Java). The arithmetic used, nowadays,
> is almost invariably decimal floating-point; the COBOL 2002
> ISO standard, for example, requires that all standard decimal
> arithmetic calculations use 32-digit decimal floating-point.

I don't intend to get into a debate about the pros/cons of various
internal representations of data, nor how they are processed in the
languages.  The following is simply to state a few facts that expands on
the above:
1)  IBM System z [mainframe systems] do have hardware implementation of
decimal float.
2)  Support for the hardware in #1 is provided for programs written in
[in alphabetical order]:
a) Assembler Language
b) C/C++
c) PL/I
d) The SHARE User Group has requested support for COBOL,
but IBM has not yet responded to the requirement.

Carl

Report this thread to moderator Post Follow-up to this message
Old Post
CG
11-05-07 11:55 PM


Re: COBOL's Influence on C
On Mon, 05 Nov 2007 13:08:21 -0500, CG
<Carl.Gehr.ButNoSPAMStuff5@MCGCG.Com> wrote:

>On 11/05/07 11:02 am, Rick Smith wrote: 
>
>I don't intend to get into a debate about the pros/cons of various
>internal representations of data, nor how they are processed in the
>languages.  The following is simply to state a few facts that expands on
>the above:
>1)  IBM System z [mainframe systems] do have hardware implementation of
>decimal float.
>2)  Support for the hardware in #1 is provided for programs written in
>[in alphabetical order]:
>     a) Assembler Language
>     b) C/C++
>     c) PL/I
>     d) The SHARE User Group has requested support for COBOL,
>        but IBM has not yet responded to the requirement.

Does IBM's action on this and other requirements tell everybody
whether IBM corporate really thinks COBOL has a future?  On another
forum Tom Ross has said there are changes coming but I fear they are
years too late.
>
>Carl

Report this thread to moderator Post Follow-up to this message
Old Post
Clark F Morris
11-10-07 11:55 PM


Re: COBOL's Influence on C
On Nov 5, 4:02 pm, "Rick Smith" <ricksm...@mfi.net> wrote:
> From an ISO draft technical document:
> -----
> ISO/IEC JTC1 SC22 WG14 N1176
> Date: 2006-05-24
> Reference number of document: ISO/IEC WDTR 24732
> Committee identification: ISO/IEC JTC1 SC22 WG14
> SC22 Secretariat: ANSI
> Information Technology -
> Programming languages, their environments and system software interfaces -
> Extension for the programming language C to support decimal floating-point
> arithmetic -
> ---
> Even though the hardware may not provide decimal arithmetic
> operations, the support can still be emulated by software.
> Programming languages used for business applications either
> have native decimal types (such as PL/I, COBOL, C#, or
> Visual Basic) or provide decimal arithmetic libraries (such as
> the BigDecimal class in Java). The arithmetic used, nowadays,
> is almost invariably decimal floating-point; the COBOL 2002
> ISO standard, for example, requires that all standard decimal
> arithmetic calculations use 32-digit decimal floating-point.
> -----

The COBOL 2002 version of standard arithmetic is being superceded by
two IEEE754r compliant forms called standard binary arithmetic and
standard decimal arithmetic.  The new IEEE754r is still in draft, but
now seems fairly stable, at least in so far as J4 COBOL plans to
implement it.  As I understand it from J4 dccuments, no one has yet
implemented the standard ariihmetic of the 2002 COBOL standard and, in
view of the forthcoming changes, it is extremely unlikely that any
will. Whether or not they implement the new forms remains to be seen,
I believe that IEEE754r recommends that at least standard decimal
arithmetic be implemented by programming languages.

As a practical expedient, COBOL will diverge slightly from full
compliance from IEEE754r. The default rounding form for the new types
of standard arithmetic will still be done in the traditional COBOL
manner, presumably and reasonably for backward compatibility.
Programmers can still get effective compliance with IEEE754r by
explicitly defining the rounding mode.


Report this thread to moderator Post Follow-up to this message
Old Post
Robert Jones
11-11-07 12:55 PM


Re: COBOL's Influence on C
"Robert Jones" <rjones0@hotmail.com> wrote in message
news:1194781359.463558.183080@v2g2000hsf.googlegroups.com...
> On Nov 5, 4:02 pm, "Rick Smith" <ricksm...@mfi.net> wrote: 
interfaces - 
floating-point 
>
> The COBOL 2002 version of standard arithmetic is being superceded by
> two IEEE754r compliant forms called standard binary arithmetic and
> standard decimal arithmetic.  The new IEEE754r is still in draft, but
> now seems fairly stable, at least in so far as J4 COBOL plans to
> implement it.  As I understand it from J4 dccuments, no one has yet
> implemented the standard ariihmetic of the 2002 COBOL standard and, in
> view of the forthcoming changes, it is extremely unlikely that any
> will. Whether or not they implement the new forms remains to be seen,
> I believe that IEEE754r recommends that at least standard decimal
> arithmetic be implemented by programming languages.

Yes, all true, as I understand it; but did you at least smile,
knowing that part of the rationale for extending the C standard
was something from the COBOL standard that is effectively dead!

[I posted the quote from the C technical report as an inside
joke for those familar with the activities regarding the COBOL
standard. <g>]



Report this thread to moderator Post Follow-up to this message
Old Post
Rick Smith
11-11-07 12:55 PM


Re: COBOL's Influence on C
On Nov 11, 1:39 pm, "Rick Smith" <ricksm...@mfi.net> wrote:
> "Robert Jones" <rjon...@hotmail.com> wrote in message
>
> news:1194781359.463558.183080@v2g2000hsf.googlegroups.com...
>
>
> 
> interfaces - 
> floating-point 
> 
>
> Yes, all true, as I understand it; but did you at least smile,
> knowing that part of the rationale for extending the C standard
> was something from the COBOL standard that is effectively dead!
>
> [I posted the quote from the C technical report as an inside
> joke for those familar with the activities regarding the COBOL
> standard. <g>]

Yes I agree, I think (and hope) all programming languages tend to
adopt useful features from other languages.


Report this thread to moderator Post Follow-up to this message
Old Post
Robert Jones
11-11-07 11:55 PM


Re: COBOL's Influence on C
"Clark F Morris" <cfmpublic@ns.sympatico.ca> wrote in message
 news:5akcj3t2umrpdv949h4m96nosnq0cli31r@
4ax.com...
> On Mon, 05 Nov 2007 13:08:21 -0500, CG
> <Carl.Gehr.ButNoSPAMStuff5@MCGCG.Com> wrote:
> 
>
> Does IBM's action on this and other requirements tell everybody
> whether IBM corporate really thinks COBOL has a future?  On another
> forum Tom Ross has said there are changes coming but I fear they are
> years too late. 

I think IBM's current view of COBOL's future is called Java.



Report this thread to moderator Post Follow-up to this message
Old Post
Charles Hottel
11-11-07 11:55 PM


Re: COBOL's Influence on C
"Rick Smith" <ricksmith@mfi.net> wrote in message
news:13je1inhintak13@corp.supernews.com...
>
> "Robert Jones" <rjones0@hotmail.com> wrote in message
> news:1194781359.463558.183080@v2g2000hsf.googlegroups.com... 
> interfaces - 
> floating-point 
>
> Yes, all true, as I understand it; but did you at least smile,
> knowing that part of the rationale for extending the C standard
> was something from the COBOL standard that is effectively dead!
>
> [I posted the quote from the C technical report as an inside
> joke for those familar with the activities regarding the COBOL
> standard. <g>]
>
>

I f they really want to improve C they should add an EVALUATE statement.



Report this thread to moderator Post Follow-up to this message
Old Post
Charles Hottel
11-11-07 11:55 PM


Re: COBOL's Influence on C
"Charles Hottel" <chottel@earthlink.net> wrote:
>
> I f they really want to improve C they should add an EVALUATE statement.

AFAIK, C has always had the 'switch' statement, Pascal has the 'case'
statement, modern BASICs have the SELECT statement, etc., all of which
predated EVALUATE, and from which I suspect EVALUATE was taken.
Unlike the other languages, C's 'switch' statement 'drops through' successiv
e
'case' phrases. EVALUATE is more powerful (flexible) than the others;
perhaps that was what you meant. :-)
--
Judson McClendon      judmc@sunvaley0.com (remove zero)
Sun Valley Systems     http://sunvaley.com
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."



Report this thread to moderator Post Follow-up to this message
Old Post
Judson McClendon
11-11-07 11:55 PM


Re: COBOL's Influence on C
Charles Hottel wrote:
> I f they really want to improve C they should add an EVALUATE statement.

As Judson said, you do have switch().  But, I've really missed the
EVALUATE TRUE form of the verb.  In C (or Java, my current project), you
can't say

switch (true) {
case a = b:
doSomethingCool();
}

Add this to the restriction that you can't switch on a string, and I
really have little to no use for the Java switch statement at all.  :(

--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
~     / \/ _ o     ~          Live from Albuquerque, NM!          ~
~     _ /\   |     ~                                              ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Business E-mail  ~ daniel @ "Business Website" below            ~
~ Business Website ~ http://www.djs-consulting.com                ~
~ Tech Blog        ~ http://www.djs-consulting.com/linux/blog     ~
~ Personal E-mail  ~ "Personal Blog" as e-mail address            ~
~ Personal Blog    ~ http://daniel.summershome.org                ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~

GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ !O M--
V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e h---- r+++ z++++

"Who is more irrational?  A man who believes in a God he doesn't see,
or a man who's offended by a God he doesn't believe in?" - Brad Stine

Report this thread to moderator Post Follow-up to this message
Old Post
LX-i
11-12-07 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Pages (15): [1] 2 3 4 5 6 » ... Last »
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:14 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.