|
The original poster was looking for a way to write a program that would auto-discriminate between a packed parameter being passed and a zoned parameter being passed. This is why writing information outside of the scope of the variable is a concern, because a 7-digit packed variable is a different number of bytes than a 7-digit zoned. For this same reason, a prototype does not solve anything! Furthermore, since he's calling the program from RPG II programs, he can't use the prototype to make sure his call is passing the right stuff. Please try to actually read and follow the thread before replying! It frustrates me that I have to _DEFEND_ my suggestions to the people on this list, and frankly makes me wonder why I bother posting things here to begin with. On Fri, 10 Mar 2000 Jon.Paris@halinfo.it wrote: > > >> The reason that I used pointers is because I'm paranoid about writing data > to an area of memory outside the scope of my variable. > > Seems to me that you're using a sledgehammer to crack a nut though. Why not > prototype the call then the _compiler_ will tell you you've screwed up the > parameter lengths. > +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.