|
4 registered members (AndrewAMD, Lapsa, Martin_HH, 1 invisible),
1,276
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
String Array
#230300
10/04/08 17:06
10/04/08 17:06
|
Joined: Feb 2006
Posts: 385 Oldenburg,Germany
Ralph
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
|
Hi, i would like to use string array´s, but i cant find something about it in the manual. Anyone know how to use string array´s? (i know that in C++ you can use char array´s) ...Okay i can use delimiter´s in a normal string like this "word%foobar%blubb" and cut the string if i need one of these words, but this is not the best and easiest way. Ralph
|
|
|
Re: String Array
[Re: Ralph]
#230376
10/05/08 05:14
10/05/08 05:14
|
Joined: Feb 2008
Posts: 337
Vadim647
Senior Member
|
Senior Member
Joined: Feb 2008
Posts: 337
|
use TEXT* pointers. You can use them as string arrays, and just keep it not visible. It's fully described in manual.
I switched to other account since marth 2010. Guess which.
|
|
|
Re: String Array
[Re: Vadim647]
#230394
10/05/08 09:50
10/05/08 09:50
|
Joined: Feb 2006
Posts: 385 Oldenburg,Germany
Ralph
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
|
I have this idea yesterday, but i dont want to make 100 or more TEXT* pointers. But thank you.
Ralph
Last edited by Ralph; 10/05/08 09:50.
|
|
|
Re: String Array
[Re: Ralph]
#230404
10/05/08 10:59
10/05/08 10:59
|
Joined: Feb 2008
Posts: 337
Vadim647
Senior Member
|
Senior Member
Joined: Feb 2008
Posts: 337
|
You dont understand. TEXT pointer can store in it any cound of strings. Then you just need to use string\pstring to edit or view them.
I switched to other account since marth 2010. Guess which.
|
|
|
Re: String Array
[Re: Ralph]
#230619
10/07/08 05:56
10/07/08 05:56
|
Joined: Jul 2006
Posts: 503 Australia
adoado

User
|

User
Joined: Jul 2006
Posts: 503
Australia
|
You can alternatively use an array of handles to dynamically created strings, eg: var MyArrayOfStr[10];
..
//To place a string
MyArrayOfStr[0] = handle(str_create("A new string here"));
..
//To get a string
String* StrPointer;
StrPointer = ptr_for_handle(MyArrayOfStr[0]);Also remember to use ptr_remove when they are no longer needed  The code is not tested, but it should look something like that  Thanks, Adoado
|
|
|
|