PIC Simulator Basic Compiler - String variable

Status
Not open for further replies.

joujou.k

New Member
Hi,

I need your help with the basic compiler of Simulator IDE.
I have previously written my code in mikroBasic, and now switching to PIC simulator IDE basic after facing several problems and bugs.
Part of my program displays a certain message on an LCD.
In mikroBasic, it was possible to define an arrary of "string" type as follows:
dim msg1 as string[20]
and in my program i would write the appropriate message to the variable msg1 then display it on my lcd

load_msg [a function i have written to assign the correct message value]
Lcd_Out(2,1,msg1) [display the message on the LCD]


Is that somehow possible in the basic compiler in simulator ide?
Can i have a variable defined as string?
From what i've read and searched for, there are only 4 possible data types (bit, byte, word, long), and the LCD function that outputs to the LCD take the string or message directly as an argument - like LCDOUT "HELLO"

I would appreciate it if you could help me out with this.

Thanks
 
It looks like the only way to do it is with a byte array.

Dim String as Byte(10)

and then write your functions accordingly.

If you are using an 18 series chip then have a look at the free version of Swordfish Basic.

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…