String Variable

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

String Variable

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post 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,

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

String Variable

Post 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

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

String Variable

Post by saschech@gmx.de »

Hello

Have you not read this question?

Regards wolfgang

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post 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"

Post Reply