Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Quad, TipmyPip), 865 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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