Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 827 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Processing TEXT* pstring array #476975
04/29/19 16:09
04/29/19 16:09
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
A TEXT* can contain more than one string, for example 8 pieces.
The documentation writes this about the stored strings:
Code:
STRING*	*pstring;	// pointer to array of string pointers


The txt_load function is able to fill such TEXT with series of strings, and only one TEXT will be filled.
How can i process each of the strings in a loop?

Or i misunderstood something, and there is only one string that is delimited inside with CR+LF characters?

I investigated more this situation. It turned out there is really only one string that is delimited inside with CR+LF characters. So, maybe i will delete this post.
This is more complex than i thought. Especially when changed from UTF-8 to UTF-16 LE.
OK, i stop now.

Last edited by Aku_Aku; 04/29/19 17:29.
Re: Processing TEXT* pstring array [Re: Aku_Aku] #476978
04/29/19 22:05
04/29/19 22:05
Joined: Oct 2008
Posts: 681
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 681
Germany
The strings are assigned automatically, also the delimiting by file_str_read.
You just need to set the count of strings.

(count of lines = count of stings)

TEXT* txt = txt_create(...,countOfLinesInTextFile);
txt_load(txt,...);

Last edited by Ayumi; 04/29/19 22:12.

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