Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, ozgur), 1,421 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Divide a number in A7 Lite-c #145854
08/04/07 22:50
08/04/07 22:50
Joined: Jun 2006
Posts: 214
Germany, NRW
T
TheThinker Offline OP
Member
TheThinker  Offline OP
Member
T

Joined: Jun 2006
Posts: 214
Germany, NRW
Argh,
I need your help. Input numbers: m = 256 / 384; The result should be 0,667 but the : str_for_num(debug1,m) says "0". Is there a special way zo divide numbers?
The same for 1 / 4 and so on. I cant divide numbers.
Thank you,
Patrick

Last edited by TheThinker; 08/04/07 22:50.
Re: Divide a number in A7 Lite-c [Re: TheThinker] #145855
08/04/07 23:47
08/04/07 23:47
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
yes, you can divide numbers. there's nothing wrong with the way you're doing it. there's just something wrong with str_for_num, i'd assume, or the way you're using it, but i can't tell with what little info i can see from here. my personal recommendation is that when you want to see the output of a variable, make a panel use the variable, not a string, unless you want to write to a file or have typed user input or something. strings can be quite frustrating or tedious, and from what i can see you don't need to use them.

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: Divide a number in A7 Lite-c [Re: JibbSmart] #145856
08/05/07 08:27
08/05/07 08:27
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Will work if you write in this way : m = 256.0/384.0

Re: Divide a number in A7 Lite-c [Re: vlau] #145857
08/05/07 12:58
08/05/07 12:58
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
Well it depends on the datatype of "m". It should be float or double if you want to store decimals.


Your friendly mod is at your service.

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