PDA

View Full Version : Help with arrays & strings



bearpawz
- 15th May 2004, 22:26
Hi,

I want to know if there is an easy way to do this: The shor version is I need to store string data in an array.. This works:

MsgBuff[0] = "C"
MsgBuff[1] = "A"
MsgBuff[2] = "L"
MsgBuff[3] = "I"
MsgBuff[4] = "B"
MsgBuff[5] = "R"
MsgBuff[6] = "A"
MsgBuff[7] = "T"
MsgBuff[8] = "E"
MsgBuff[9] = " "

But is a pain... Is there anyway to assign the array values all at once? (ie: MesgBuff[]="CALIBRATE "

Melanie
- 16th May 2004, 11:50
Previously discussed - if you searched on "strings" example...

http://www.picbasic.co.uk/forum/showthread.php?s=&threadid=95&highlight=strings

You can always preset your strings in internal or external EEPROM and load them from there, or preset them into Program Space (see making Program Space your Playground - search on keyword "Playground").

bearpawz
- 16th May 2004, 16:33
I guess that will have to go on the "wish list" then... I'll look into that EEPROM idea... I am using a PIC1684A and not much EEPROM space.. In the mean time I decided to just shove everything into a look up table.