Page 1 of 1

Getting error with Word2STR function

Posted: 19 Jan 2024 00:09
by Got_MiKroC
Hello all,
I'm experimenting with the Word2STR function - which is one of the CONVERSION functions.

I'm trying the example code which is provided in help info for this function
But I'm getting an error

//EXAMPLE:
unsigned t = 437;
char txt[6];
WordToStr(t, txt); // Here txt should be converted to the string: " 437"

//ERROR:
47 300 Syntax Error: ')' expected, but 'txt' found


Can anyone advise?
Sincere thanks!

Re: Getting error with Word2STR function

Posted: 19 Jan 2024 00:42
by Got_MiKroC
My bad!
I had the function called outside of the MAIN
Its working fine now!
Sorry!!!