Initialization Expressions in PL/I (was ANSI PL/I) 
Author Message
 Initialization Expressions in PL/I (was ANSI PL/I)


Date: Thu, 29 Aug 2002 12:01:50 GMT
.

Quote:
> I used FPS4.0 until CVF replaced it,  but I miss ability to set PI,  PI2,
> ETC  directly from intrinsic functions.
> Sooo, can PL/I generate a program constant for PI  a-la ...
> real(8),parameter :: PI = 4.0 * atan(1.0d0)
> (just approved by the J3 committee, but already present in my FPS4.0)..

The PL/I Optimising and Checkout compilers (IBM) have had this since
the early 1970s.

The PL/I Enterprise compilers also support expressions in static
initialization expressions for any function, and that includes the
VisualAge products, which carried it from the earlier PL/I for OS/2.

Examples:

x:
   proc options (main);
      dcl pi float (18) static initial ((4*atan(1.0q0)));

      dcl another_pi float (18) value ((4*atan(1.0q0)));

      dcl a(4) float (18) static initial (log10(1.), log10(10.),
                                          log10(100), log10(1000.));

      put (pi, another_pi);
      put skip list (a);
end x;

 3.14159265358979324E+0000                3.14159265358979324E+0000
 0.00000000000000000E+0000                1.00000000000000000E+0000
 2.00000000000000000E+0000                3.00000000000000000E+0000



Tue, 15 Feb 2005 21:47:21 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. PL/I style (was: default variable initialization under os/390 v2r8)

2. Logo Komeniusz PL (Logo Comenius PL)

3. Derivation of PL/I (was Usenet group for PL/M language)

4. Mapping local files to FILE declarations in PL/I with IBM VisualAge PL./I for Windows

5. Difference PL/1 PL/I

6. What is the difference between DEC PL/1 and OS/390 PL/1

7. ANSI PL/I

8. Migrating from OS/VS PL/I to VA PL/I

9. PL/I FAQ -- Frequently asked questions about PL/I (minor update)

10. The PL/I Connection (PL/I Newsletter No. 6)

11. How VOS PL/I tames PL/I

12. PL1 JOBS PL/I Jobs PL/1 JOBS

 

 
Powered by phpBB® Forum Software