|
Peter, if you modify the proto as shown below you can avoid some work and make the thing simpler for others to follow. In my experience many people go glassy-eyed at the sight of a %Addr. For the first parm you can specify *STRING which will allow you to specify a field name and let the compiler do the work. You have no choice but to pass a pointer for the second parm since the content will be modified, but passing a pointer by value and a field name by reference are equivalent so ...... After all, why do more work than you need - let the compiler do it! Dreadlink PR 10I 0 EXTPROC('readlink') D * VALUE OPTIONS(*STRING) D 2000A OPTIONS(*VARSIZE) D 10I 0 VALUE D SymName S 50A D Path S 256 D ReturnInt S 10I 0 *----------------------------------------------------------------* C *Entry Plist C Parm SymName C Eval ReturnInt = readlink(SymName : Path C :%size(Path)) Jon Paris +--- | 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.