Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by jcl. 04/20/24 08:52
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (7th_zorro, Aku_Aku, henrybane, flink, 1 invisible), 712 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
optimize() bug? #451346
05/02/15 23:38
05/02/15 23:38
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi jcl. In Test, this script:

Code:
void	run() {
	set(PARAMETERS);
	int	i = optimize(100,1,500,20);
	int	j = optimize(100,1.500,20);
	printf("\ni,j=%i,%i",i,j);
	quit();
}



produces "i,j=100,20".

The typo in the j optimize call causes the min to be 1.5 and the max to be 20, with no step. Why is 20 returned rather than 100 in Test? The manual seems to say that start may be outside min..max...

Thanks.

Re: optimize() bug? [Re: DdlV] #451359
05/04/15 10:54
05/04/15 10:54
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
No, I don't think that the start can be outside the valid range.

Re: optimize() bug? [Re: jcl] #451362
05/04/15 14:28
05/04/15 14:28
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl. OK, then rather than the current ">0" (which is already incorrect given the <0 facility), the manual should say min<=abs(start)<=max?

Thanks.


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