Re: Paper on PL/I
- From: "John W. Kennedy" <jwkenne@xxxxxxxxxxxxx>
- Date: Mon, 02 Jan 2006 10:47:01 -0500
multicsfan wrote:
The use is to get around the problem that is you have something like:
dcl a float bin;
a=3*4+2; /* IIRC this gives an answer of 4 in PL/1-F and other compilers */
all the number oare considerd fixed decimal (1,0) compile time so all the math is done as fixed decimal (1,0) until the assignment is reached at which point the fixed decimal(1,0) number is converted to float bin.
Not in any dialect of PL/I I'm familiar with. If MULTICS PL/I does that, it's a huge mistake. PL/I does have problems in this area, especially when fixed-point division is involved, but it isn't supposed to do that.
The usual decimal/binary failure is caused by not fully declaring ENTRY attributes.
CALL DOIT (2); ....
DOIT: PROCEDURE (X); DECLARE X FLOAT; ...
fails, but
DECLARE DOIT ENTRY (FLOAT); .... CALL DOIT (2); ....
DOIT: PROCEDURE (X); DECLARE X FLOAT; ...
works.
-- John W. Kennedy "But now is a new thing which is very old-- that the rich make themselves richer and not poorer, which is the true Gospel, for the poor's sake." -- Charles Williams. "Judgement at Chelmsford" .
- Follow-Ups:
- Re: Paper on PL/I
- From: Tom Linden
- Re: Paper on PL/I
- References:
- Re: Paper on PL/I
- From: John W. Kennedy
- Re: Paper on PL/I
- From: Tom Linden
- Re: Paper on PL/I
- From: Peter Flass
- Re: Paper on PL/I
- From: multicsfan
- Re: Paper on PL/I
- From: Peter Flass
- Re: Paper on PL/I
- From: multicsfan
- Re: Paper on PL/I
- From: Peter Flass
- Re: Paper on PL/I
- From: multicsfan
- Re: Paper on PL/I
- Prev by Date: Re: Paper on PL/I
- Next by Date: Re: Paper on PL/I
- Previous by thread: Re: Paper on PL/I
- Next by thread: Re: Paper on PL/I
- Index(es):
Relevant Pages
|