Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Quad, 1 invisible), 721 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Adding 'separator' parameter to str_parse #318149
04/05/10 15:24
04/05/10 15:24
Joined: Sep 2003
Posts: 303
Germany
Clemens Offline OP
Senior Member
Clemens  Offline OP
Senior Member

Joined: Sep 2003
Posts: 303
Germany
Hi Conitec/JCL,
what about adding the parameter 'separator' to the new (beta) str_parse function? -> making it possible to decide, which character (instead of only space) is used for separating the words.
With this it would be really easy to simulate the wished str_split, too.
Greetings, Clemens

Marginal: What's the criterion for adding a function to the engine dll or to the (strio).c?

Re: Adding 'separator' parameter to str_parse [Re: Clemens] #341179
09/12/10 20:29
09/12/10 20:29
Joined: Sep 2003
Posts: 303
Germany
Clemens Offline OP
Senior Member
Clemens  Offline OP
Senior Member

Joined: Sep 2003
Posts: 303
Germany
Would like to refocus on this request ... cause I think it has its right to get discussed.

However, I did this small change on my own - but prefer having it general integrated.

One problem seems to be, that the function becomes incompatible with earlier scripts using it, when changing it (->its parameters).

So it's time for having the feature "functions with a variable argument number" ([url="http://manual.3dgamestudio.net/forecast.htm"]forecast[/url]) released...! wink

Re: Adding 'separator' parameter to str_parse [Re: Clemens] #341182
09/12/10 21:06
09/12/10 21:06
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
I have already opened a thread about variadic functions -> http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=340444#Post340444

While variadic functions can be a really great way to provide a cleaner API for some cases (eg. printf), it's still dirty and should be avoided if possible. In this case the function could be overloaded without any problems.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Adding 'separator' parameter to str_parse [Re: WretchedSid] #341225
09/13/10 13:44
09/13/10 13:44
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
We won't add a new function, but will add a global variable for the parse separator.

Re: Adding 'separator' parameter to str_parse [Re: jcl] #401974
05/27/12 15:04
05/27/12 15:04
Joined: Jun 2001
Posts: 1,004
Dossenbach
N
nfs42 Offline
Serious User
nfs42  Offline
Serious User
N

Joined: Jun 2001
Posts: 1,004
Dossenbach
Hi JCL,
is there a global var for this ? probably we could use delimit_str ?


Andreas
GSTools - Home of
GSTScript 0.9.8: lua scripting for A6/7/8
GSTNet 0.7.9.20: network plugin for A6/7/8
GSTsqlite 1.3.7: sql database plugin for A6/7/8
3DGS Codebase: 57 snippets || 3DGS Downloads: 248 files

Moderated by  aztec, Spirit 

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