[comp.sys.mac.programmer] str2dec conversion question

wes@arco.com (Wesley Monroe) (03/20/91)

I am trying to find documentation on a routine str2dec().  I am calling
the routine from C (MPW C) to change a string to a decimal format
before I call dec2num() to convert it to an extended...

void str2dec(const char *s, short *x, decimal *dec, short *vp)

What I can't figure out is what type of string str2dec wants, a
Pascal string or a C string.  Actually, by trying things out, it
seems that it wants a null terminated C string, but could point
me to some documentation, or enlighten me as to what this thing
really wants???

Cheers,

Wes

P.S. I've looked in the Apple numerics manual, and i see nothing
about str2dec().

Jim.Spencer@p510.f22.n282.z1.fidonet.org.org (Jim Spencer) (03/21/91)

Wesley Monroe writes in a message to All

WM> What I can't figure out is what type of string str2dec wants, 
WM> a Pascal string or a C string. Actually, by trying things out, 
WM> it seems that it wants a null terminated C string, but could 
WM> point me to some documentation, or enlighten me as to what this 
WM> thing really wants???

This is a SANE call and is documented in the SANE manual.