Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,429 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Using TEXT* as string arrays? #249900
02/04/09 19:35
02/04/09 19:35
Joined: Jul 2005
Posts: 192
Orange County
S
silencer Offline OP
Member
silencer  Offline OP
Member
S

Joined: Jul 2005
Posts: 192
Orange County
Does the following still work in C-Lite? If not, what is the new syntax?

Code:
TEXT* willkommen
{
...
strings = 5; // 5 differenet string pointes
string = willkommen, dies_ist, ein, text,string1;
}

...

my_text.string[3] = new_string;



AMD 64 x2 4400+ 2048mb DDR3200 NVidia 6800GS 256mb Soundblaster Audigy 2 A7 Commercial 7.07
Re: Using TEXT* as string arrays? [Re: silencer] #249902
02/04/09 19:36
02/04/09 19:36
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
str_cpy((my_text.pstring)[3],new_string);


3333333333
Re: Using TEXT* as string arrays? [Re: Quad] #249906
02/04/09 19:55
02/04/09 19:55
Joined: Jul 2005
Posts: 192
Orange County
S
silencer Offline OP
Member
silencer  Offline OP
Member
S

Joined: Jul 2005
Posts: 192
Orange County
Thanks friend!


AMD 64 x2 4400+ 2048mb DDR3200 NVidia 6800GS 256mb Soundblaster Audigy 2 A7 Commercial 7.07
Re: Using TEXT* as string arrays? [Re: silencer] #249915
02/04/09 20:30
02/04/09 20:30
Joined: Jul 2005
Posts: 192
Orange County
S
silencer Offline OP
Member
silencer  Offline OP
Member
S

Joined: Jul 2005
Posts: 192
Orange County
What if "new_string" is of type "string*" , will that be a problem since my_text.pstring is of type "string"?


AMD 64 x2 4400+ 2048mb DDR3200 NVidia 6800GS 256mb Soundblaster Audigy 2 A7 Commercial 7.07
Re: Using TEXT* as string arrays? [Re: silencer] #250031
02/05/09 16:20
02/05/09 16:20
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
aren't there real string arrays now? working with pointers?
can anyone get me started on them? can't find info about them.

Re: Using TEXT* as string arrays? [Re: SchokoKeks] #250032
02/05/09 16:25
02/05/09 16:25
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
the correct syntax for a string array

Code:
STRING** tst;
tst = malloc(sizeof(STRING*),number of elements);
for(int i=0;i<number of elements;i++)
tst[i]=str_create("#number of characters");

//now you can access the string array like this:

str_cpy(tst[0],"hallo");



Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1