Hi,
I need to convert a C string to a Pascal string,
modify it, and convert it back to C.
All i have is a handle to the C string
DIM CHndl& 'Its stored here
How do i convert it to a Pascal string ?
Please, don't laugh too hard, this is
what i came up with to convert from Pascal to C:
'---------------------------------------
'Pascal string to C string
DIM pascal$, c$
pascal$ = "Hello"
FOR x = 1 TO LEN(pascal$)
POKE @c$ + x - 1, PEEK(@pascal$ + x)
NEXT x
POKE @c$ + (LEN(pascal$) + 1), ASC("0")
'---------------------------------------
Is it any good or is there a simpler way that
i don't know ?
Thanks,
Sylvain