Gamestudio Links
Zorro Links
Newest Posts
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
NOMAX undeclared identifier.
by Petra. 01/09/26 21:12
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 2,814 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joe_kane, Namitha_NN, Syndrela, agasior, mosfet
19189 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Something wrong with assignment of float?? #228892
09/23/08 11:35
09/23/08 11:35
Joined: Nov 2007
Posts: 37
L
LavenderSs Offline OP
Newbie
LavenderSs  Offline OP
Newbie
L

Joined: Nov 2007
Posts: 37
Hi, guys!
Here is a little issue for Lite-C. How to assign a floating point number to the 'float' variable? For instance:

float i = 100 / 80 + 100 % 80; //just let i be 1.25

But I see that the result in debug window is 1 rather than 1.25. Do anyone know what's wrong with it??

Re: Something wrong with assignment of float?? [Re: LavenderSs] #228908
09/23/08 13:04
09/23/08 13:04
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
A lot of the numbers being diplayed in the the
debug panel have there decimal fractions trimmed off
for ease reading of display.
The numbers do have a float content but only the
integer portion is displayed.
ie pan = '12.34567' is displayed as '12'.

What variable is you float getting put into and I'll check
this is the case with that variable.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

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

Gamestudio download | 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