1) You need to allocate space for c before the StrItoA statement.
2) the syntax is just StrIToA(c, value); don't need the s=
> -----Original Message-----
> From: pete moss [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 01, 1999 4:36 PM
> To: [EMAIL PROTECTED]
> Subject: StrIToA ???
>
> I am trying to use this function to convert a number to a string to show
> up in a label. i am doing something like this:
>
> ....
> Long value;
> CharPtr s, c;
>
> s=StrIToA(c, value);
> ....
>
>
> whenever i have this line in my code, POSE crashes with a 'bus error'.
> this happens whether i use s or c or not. if i comment out this line
> then no problems. anyone know what is wrong with this? also, why does
> it return a CharPtr and also set another CharPtr (returns s and sets
> c)? which variable holds the string version of value? why isnt it
> defined like CharPtr StrIToA(Long i) ?
>
> also, what is a 'bus error'?
>
> pete