It's more like this. I have a .lib with a function defined in the header file as:
extern int rd123fld(FILE *, char *, char *, char *, long *, int *)
The actual function is:
int rd123sfld(fp,tag,leadid,rd_str,str_len,status)
FILE *fp ;
char *tag ;
char *leadid;
char *rd_str;
long *str_len;
int *status;
char *rd_str is the one which returs the "float" value.
In my main program there is a string defined as:
char string[5000]
later in the code the function is called like this:
if (! rd123sfld
(fpin, /* file pointer */
tag, /* field tag returned */
&leadid, /* leader identifier returned */
string, /* subfield contents returned */
&str_len, /* string length */
&status)) /* status returned */
{
printf ("\nERROR READING DATA RECORD SUBFIELD"

;
goto done;
}
I then need to convert the first 4 bytes of string to the float value.
I'll try what you suggested, but if you can provide any further suggestions, that would be great. I didn't write this code, and the guy who did sied last year. I've been given the task of fixing it. I appreciate the help.
Cameron