× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Oh BTW, these are simple numeric constants...
dcl-c c001 const(1);

Might try a character constant and or constant with a long name.


On Thu, Mar 16, 2017 at 3:43 PM, Charles Wilt <charles.wilt@xxxxxxxxx>
wrote:

So playing around with it...

I can defined 119 constants before the 4KB bump occurs...
I can then define another 120 before the next 4KB bump...

Still curious as to what the space is used for...

Wonder how much a PR takes...


Charles


On Thu, Mar 16, 2017 at 10:36 AM, Charles Wilt <charles.wilt@xxxxxxxxx>
wrote:

So I've got a simple RPGLE program...

/FREE
dsply 'Hello World';
*INLR=*ON;
return;
/END-FREE

Compiled with:
OPTION(*NOUNREF) DBGVIEW(*NONE) OPTIMIZE(*FULL) TGTRLS(*CURRENT)

I've also got two /INCLUDE files, one with prototypes and one with
constant definitions.

I was surprised to find that static storage appears to go up about 16
bytes per prototype; even though none of the procedures are called.

I was even more surprised to find that program size seems to up 4KB if I
include both prototypes & constant files; if I only include one of them, it
doesn't change. However, if I cut down the number of PR's & CONSTs...then
the program size goes back down 4KB.

Can anyone (Barbara :) ) provide some insight into this madness?

I'm trying to argue that this style of using PRs
/define inc_myfun1_pr
/define inc_myfun2_pr
/define inc_myfun3_pr
/include MYPROTOS
/undefine inc_myfun1_pr
/undefine inc_myfun2_pr
/undefine inc_myfun3_pr

To only include the prototypes of procedures you need to call is silly.

Additionally, I'm arguing for having a STDCONST file of the most used
constants is a good idea. Rather than defining the constants in each
program.

The push-back is that the unneeded PRs & CONSTs would increase program
size. I said no they won't, but apparently I was wrong. :)

So I'm trying to understand the behavior so I can counter-argue correctly.

Thanks!
Charles








As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.