Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, AndrewAMD), 911 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problems with Division / Probleme mit Division #251148
02/11/09 19:06
02/11/09 19:06
Joined: Sep 2007
Posts: 48
Deutschland
H
HoopyDerFrood Offline OP
Newbie
HoopyDerFrood  Offline OP
Newbie
H

Joined: Sep 2007
Posts: 48
Deutschland
Hi,
I've recognized a strange behavior connected with the Division operator. I've a test variable (var) that I screen with two decimals.
And when I set this variable to the result of a calulation it always is an integer when I use the "/" operator. Can anyone check if he recognizes a similar behavior? I want to check this carefully before I call it a "bug".

test1 = 4/3; -> Screens "1.00"
test1 = 5/2; -> Screens "2.00"
test1 = 5*0.5 -> Screens "2.50" (so decimals work theoretical)

Hallo,
mir ist ein seltsames Verhalten in zusammenhang mit Divisionen aufgefallen. Ich habe eine Testvariable (var) die ich mit 2 Nachkommastellen Anzeige. Nur wenn ich diese Variable auf das Ergebnis einer Division setzte bekomme ich immer eine ganze Zahl. (siehe oben). Könnte das mal Irgendjemand überprüfen, ob er ein ähnliches Verhalten feststellt? Ich möchte es gründlich überprüfen befor ich es "bug" nenne.

Last edited by HoopyDerFrood; 02/11/09 19:07.
Re: Problems with Division / Probleme mit Division [Re: HoopyDerFrood] #251150
02/11/09 19:24
02/11/09 19:24
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
4.0/3.0 or 4/3.0 will work i guess.

when you divide ints it results in int.

Last edited by Quadraxas; 02/11/09 19:24.

3333333333
Re: Problems with Division / Probleme mit Division [Re: Quad] #251159
02/11/09 20:07
02/11/09 20:07
Joined: Sep 2007
Posts: 48
Deutschland
H
HoopyDerFrood Offline OP
Newbie
HoopyDerFrood  Offline OP
Newbie
H

Joined: Sep 2007
Posts: 48
Deutschland
Thank you, it works.
So it isn't a bug but a case for "blame the manual".

I've another question. I have an extern functtion coded in C++, compiled with VC++.

Code:
DLLFUNC double CamGetDLLVersion(void)
{
	return 1.43;
}


But when I screen the result of calling the function it differs a litte bit to 1.43. For example 1.41 is the result.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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