Just starting out? Need help? Post your questions and find answers here.
-
qqqnnn
- User

- Posts: 22
- Joined: Mon Jan 11, 2010 7:45 pm
Post
by qqqnnn »
Correct result = 50/100 = 0.5
purebasic 50/100 = 0 ???????
How to get the correct solution
-
Olliv
- Enthusiast

- Posts: 542
- Joined: Tue Sep 22, 2009 10:41 pm
Post
by Olliv »
Debug 50. / 100.
-
qqqnnn
- User

- Posts: 22
- Joined: Mon Jan 11, 2010 7:45 pm
Post
by qqqnnn »
Olliv wrote:Debug 50. / 100.
Thank you so much thank you
-
qqqnnn
- User

- Posts: 22
- Joined: Mon Jan 11, 2010 7:45 pm
Post
by qqqnnn »

Not run
-
eesau
- Enthusiast

- Posts: 589
- Joined: Fri Apr 27, 2007 12:38 pm
- Location: Finland
Post
by eesau »
-
qqqnnn
- User

- Posts: 22
- Joined: Mon Jan 11, 2010 7:45 pm
Post
by qqqnnn »

+Infinity
-
eesau
- Enthusiast

- Posts: 589
- Joined: Fri Apr 27, 2007 12:38 pm
- Location: Finland
Post
by eesau »
It was a typo, please try again.
-
qqqnnn
- User

- Posts: 22
- Joined: Mon Jan 11, 2010 7:45 pm
Post
by qqqnnn »
eesau wrote:It was a typo, please try again.
Such an error?
-
Olliv
- Enthusiast

- Posts: 542
- Joined: Tue Sep 22, 2009 10:41 pm
Post
by Olliv »
Code: Select all
; THE... PERFECT METHOD...
EnableExplicit
Define.F X, Y
X = 50.
Y = 100.
Debug X / Y
-
qqqnnn
- User

- Posts: 22
- Joined: Mon Jan 11, 2010 7:45 pm
Post
by qqqnnn »
Code: Select all
LoadImage(0,Image)
Debug ImageHeight(0) /ImageWidth(0)
Image width=100px
Image height=50px

Debug ImageHeight(0) /ImageWidth(0) =0????????????????????????
-
Kaeru Gaman
- Addict

- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Post
by Kaeru Gaman »
please
THINK
Code: Select all
LoadImage(0,Image)
y.f = ImageHeight(0)
x.f = ImageWidth(0)
a.f = y/x
debug a
ImageHeight and ImageWidth return
integers, not
floats.
oh... and have a nice day.
-
Olliv
- Enthusiast

- Posts: 542
- Joined: Tue Sep 22, 2009 10:41 pm
Post
by Olliv »
What I think, it's that I will need many weeks to translate,
analyze, understand and give a rational conclusion about the
question of Rook Zimbabwe!
-
qqqnnn
- User

- Posts: 22
- Joined: Mon Jan 11, 2010 7:45 pm
Post
by qqqnnn »
Thank you all for helping me solve the problem of the

Kaeru Gaman
