3

I'm reading the book about PL/1 and have some doubt about what author says:

enter image description here

And even more...

enter image description here

I did some tests and they really screams that this is not true at all. I can explain what they are if needed. So question is: does memory allocation really happen in the outer block if options(inline) is specified?

Draken
  • 3,134
  • 13
  • 34
  • 54
zer_ik
  • 410
  • 1
  • 4
  • 14
  • Which compiler have you tested with? Which book, and what publication date? There may be massive differences between previous compilers and the current Enterprise PL/I for instance. If you are reading an old book about an old compiler, how are you verifying it? Why do you have such concerns? – Bill Woodger Feb 24 '17 at 12:24
  • 2
    If your concern is how to optimize your code with a current mainframe PL/I compiler, I suggest the SHARE presentation "Make Your PL/I and C/C++ Code Fly With the Right Compiler Options" which also contains coding advice. – cschneid Feb 24 '17 at 16:51
  • 1
    The book you quote from is the ninth edition of a German-language book, the first edition of the book published in English. The preparation for the English version included considerable discussion on the internet with very knowledgeable people. You may be able to locate the discussion using the names mentioned in the Preface. The book refers to V3R7 of Enterprise PL/I. The very latest is V5R1, from June last year. You are quite likely using a V4 PL/I compiler. – Bill Woodger Feb 25 '17 at 11:50
  • If you look here, http://www-01.ibm.com/support/docview.wss?uid=swg27036735, you will be able to see the documentation available from IBM on a release-by-release basis. The Announcement Letter for each release gives and overview of what has changed for the release. I would think the book correct for V3R7, and it is possible that things have since changed. I think you need a simpler example, without IO in the relevant block. If you still disagree on the description, post your new example, the generated code, and the version/release of the compiler you are using. – Bill Woodger Feb 25 '17 at 11:54
  • And the compiler options used. – Bill Woodger Feb 25 '17 at 11:54
  • 1
    It looks like the discussions were held in comp.lang.pl1 (yes, that 1 is not a typo) which you can find in Google Groups, at least that is one place where the publication was announced, and thanking those people. – Bill Woodger Feb 25 '17 at 12:12
  • 1
    One thing to remember about things like "inline" (and this doesn't just go for PL/I) is that declarations like this are suggestions to the compiler. In this case, as @BillWoodger points out, the required overhead for the I/O statement may be forcing the compiler (with the current set of options) to ignore it. We need to see the options in effect; it may also be beneficial to see the output from the LIST option. – zarchasmpgmr Feb 27 '17 at 17:33

0 Answers0