|
I'm not familiar with strfmon? Thats not ANSI C, is it? int strfmon(char *s, size_t maxsize, const char *format, ...); the ... signifies a variable number of additional parameters, you'd need to read about what additional parameters you can pass it to it, and set up your prototype as needed. Given the following line, assuming that money is an int... (I'm assuming this because of the %i) strfmon(string, 100, "%i", money); /* $1,234.56 */ Should be something like: D strfmon PR 10I 0 ExtProc('strfmon') D s * value D maxsize 10I 0 value D format * value D money 10I 0 value options(*nopass) If you're using V3R7 or later, I'm told that you can use options(*string) on your "char" parameters, as well, if you're running V3R2 (like me) you'll need to concatenate a x'00' to signify the end of the string. Have fun.. "Hatzenbeler, Tim" <thatzenbeler@clinitech.net> wrote: > > I'm trying to figure out how to prototype some c-functions.... > > I have figured out a few, but I'm having problem figuring out this > one....I > was wondering if anyone could help me.. > > int strfmon(char *s, size_t maxsize, const char *format, ...); > > the example below has 4 parameters, but the syntax, has 3 definition > plus > the ...., I need help. > > strfmon(string, 100, "%i", money); /* $1,234.56 */ > printf("%s\n", string); > > tim > +--- | 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.