Page 1 of 1

Div Decimals?

PostPosted: November 30th, 2007, 5:50 pm
by fmwyso
Using math with decimals? Hey, i was wondering if there was an easy solution i could do in order to use decimals in math. Example, 1.2 div 1.5.

I tried integers but they don't hold the decimal value, and floats can't do div. Is there a workaround for this?

PostPosted: December 1st, 2007, 3:14 am
by Kambiz
use / operator instead of div operator.

PostPosted: December 1st, 2007, 5:39 am
by fmwyso
I feel like a moron X.X. I tried that with integers and it didn't work, didn't figure it would with floats ><. Thanks man.

PostPosted: December 1st, 2007, 11:57 am
by Johnny_Bit
and that's why Delphi sucks. people do sometimes feel like morons.

PostPosted: December 1st, 2007, 3:09 pm
by fmwyso
Hey, my project i'm working on has several different floats, variables and strings/integers. Is there an easy line of code to just free all the memory. I remember seeing it once in a source code i saw, but i don't remember what it was.

PostPosted: December 1st, 2007, 4:11 pm
by Kambiz
For these kinds of data types you don't need to free memory.

PostPosted: December 1st, 2007, 6:26 pm
by fmwyso
I got 2 questions... I want to save a .ini but to the spot the .exe is located in and not to Windows Directory. How do i get the current spot the .exe is located in? I mean because it can do that easily with saving .txt.

And secondly, can i save a memo's lines to a .ini and retrieve it/place it in a memo later?

-- Thanks again :D.

PostPosted: December 2nd, 2007, 12:51 am
by Kambiz
1. Use full path of the ini file. Without the path, it will be considered in Windows directory.
2. No.

Please create new topic for new questions.