Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
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
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 770 guests, and 6 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
Possibility to autoconvert String #171280
12/05/07 13:04
12/05/07 13:04
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
TripleX Offline OP
Expert
TripleX  Offline OP
Expert

Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
Hey,

There are still 3 big workflow slowdowns when converting from c-lite / wdl to dll (btw, if needed i could write a tutorial about this.. pretty trained in this topic now )

1) Is there any possibility to convert str_cpy(str,str2); automatically to str_cpy(str,(char*)str2);?
2) DLLFUNC long test() { return 1; } is of course 0.001 in C-Script. Is it possible to autoconvert returns to long (var as return type isn't possible because of c-binding of DLLFUNC)
3) var_array[var_value]; will give out a compiler-error. var_array[(int)var_value]; is needed. Any work around for this problem?

Thanks for any help,
Timo Stark

Re: Possibility to autoconvert String [Re: TripleX] #171281
12/06/07 06:51
12/06/07 06:51
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I'm not sure if I'm answering this correctly as I don't know the particular problem to solve, but here are some suggestions. For avoiding the (char*) typecast, use an overloaded function like

inline STRING* str_cpy(STRING* str, STRING* str2)
{
return str_cpy(str,(char*)str2);
}

For avoiding the C binding, you can use __declspec(dllexport) instead of DLLFUNC. For using var for an index in an array, overload the [] operator.


Moderated by  old_bill, Tobias 

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