Page 1 of 1
String Variable
Posted: Fri Aug 10, 2007 12:59 pm
by saschech@gmx.de
Hello
If i work with 100 text Variable,must I build 100 strings?
or is ther a way to say text_[16],[100] -Variable with 16 char,100 pices?
Regards
wolfgang
Posted: Fri Aug 10, 2007 3:16 pm
by Benj
Hello
You can build up strings with a max size of 64 to correspond with a block of memory inside the PICmicro. You can then have words or phrases inside the string eg.
char STRINGS[64] = {"HelloWorldHereIsAnExampleOFMultipleStrings"};
spaces and other characters can be added by simply using the ascii constants,
String Variable
Posted: Fri Aug 10, 2007 3:46 pm
by saschech@gmx.de
Hello Ben
I think i mean not this
With ather words can I build a 2-dimension area for string variables
variables:
text_0[16]
text_1[16]
text_3[16]
.
.
text_9[16]
in flocode:
text_0 = "das ist text1 "
text_1 = "nmnmnmn "
.
.
text_9 = "jhjhjhjhjhjhhj"
------------------------
text_1 > to display
my questione:
build Variable:
text_[10],16 for text_0........text_10 is ther a way?
in flocode:
text_[0] = "das ist text1 "
text_[1] = "nmnmnmn "
.
.
text_[9] = "jhjhjhjhjhjhhj"
------------------------------------
text_[1] > to display
String Variable
Posted: Thu Aug 16, 2007 8:26 am
by saschech@gmx.de
Hello
Have you not read this question?
Regards wolfgang
Posted: Thu Aug 16, 2007 9:11 am
by Benj
Hello
I havn't come across any implementation of two dimensional arrays with BoostC. What you could do is the following.
1) Build up your arrays of strings.
str1[] = " hellofromben"
2) Build up sentances using the index and length of the strings.
mes1[] = {1,0,6,0,10}
Length1[] = {5,1,4,1,3}
Mes1 gives "hello from ben"