Getting error with Word2STR function

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
Got_MiKroC
Posts: 36
Joined: 10 Jan 2021 23:32

Getting error with Word2STR function

#1 Post by Got_MiKroC » 19 Jan 2024 00:09

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!

Got_MiKroC
Posts: 36
Joined: 10 Jan 2021 23:32

Re: Getting error with Word2STR function

#2 Post by Got_MiKroC » 19 Jan 2024 00:42

My bad!
I had the function called outside of the MAIN
Its working fine now!
Sorry!!!

Post Reply

Return to “mikroC PRO for PIC General”