|
**CAUTION** The C Runtime routines (atoi, itoa, atof, etc) are expecting null terminated strings! If you pass them an RPG char field, it is not null terminated. The runtime function will keep processing the "string" until it hits an 0x00 in your data section...or gets a pointer violation. And if it is a function that is writing to the string, (say strcpy() ), it WILL corrupt data. And this is the very worst possible bug to introduce into your program. Bob -----Original Message----- From: Kevin Watkins [SMTP:kevinw@hurtcompanies.com] Sent: Thursday, May 13, 1999 9:08 AM To: MIDRANGE-L@midrange.com Subject: Re: Q2CLE (was: "X-Spec") whoa! stop! put on the brakes! Someone 'splain this to me! I am all ears! || > >%AtoI (Alfa to integer) || > >%AtoF (Alfa to float) || > Just add QC2LE as a binding directory, and prototype calls to the || > C-functions atoi() and atof() using a /COPY member for the prototypes. || || I know and I do - many of the current bifs are available as C-library || functions - still I find the bifs easier to use and better documented. +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.