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
2 registered members (Imhotep, opm), 785 guests, and 4 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
Page 2 of 2 1 2
Re: C++ scripts [Re: jcl] #486134
06/10/22 15:05
06/10/22 15:05
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
For the curious, the Zorro default C++ compiler options do not override struct alignment.

Code
#include <zorro.h>

typedef struct FOO1{
	char a;
	double b;
} FOO1;
#pragma pack(push,1)
typedef struct FOO2{
	char a;
	double b;
} FOO2;
#pragma pack(pop)

DLLFUNC void main() {
	set(LOGFILE);
	FOO1 foo1={};
	FOO2 foo2={};
	char *pA=0,*pB=0;
	pA = (char*)&foo1.a;
	pB = (char*)&foo1.b;
	printf("\nA: %p, B: %p, diff: %d",pA,pB,pB-pA);
	pA = (char*)&foo2.a;
	pB = (char*)&foo2.b;
	printf("\nA: %p, B: %p, diff: %d",pA,pB,pB-pA);
	printf("\nDone!");
}

/* LOG OUTPUT:

A: 0000006041F0B280, B: 0000006041F0B288, diff: 8
A: 0000006041F0B270, B: 0000006041F0B271, diff: 1
Done!

*/

Re: C++ scripts [Re: jcl] #486241
07/02/22 13:02
07/02/22 13:02
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Miscellaneous C++ problems:

1) cancelTrade is missing the overload where TRADE* is an argument.

2) distribute() function is missing. (but we do have distribute0 and distribute1.)

Re: C++ scripts [Re: jcl] #486242
07/04/22 13:02
07/04/22 13:02
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Thanks, this will be fixed in the next beta. Please continue to test.

Page 2 of 2 1 2

Moderated by  Petra 

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