MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » May 1999

RE: Q2CLE (was: "X-Spec")


  • Subject: RE: Q2CLE (was: "X-Spec")
  • From: Bob Crothers <bob@xxxxxxxxxxxxxx>
  • Date: Thu, 13 May 1999 10:54:57 -0000
  • Organization: Cornerstone Communications, LLC

fixed

**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
+---






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact