director Question
- Started
- Last post
- 6 Responses
- ********
i have a field that dispalys results form a simple math formula,
on mouseUp me
put field "age"*5/4 into field "rate"
endhow can i have the reult without the extra decimals
- hahakid0
you could always split the string at the "." and just take the first part
or maybe make sure you cast it to an integer
it's been a while since I Directed
- preston0
well if I was doing it, I'd turn it into a string, and then truncate it...
btime = btime.char[1..(btime.length-3)]
this chops off the last 3 digs of btime, which is a string
- ********0
still did not work, any body, i know this is an easy thing , i just forgot cause i hav not touched dir in a while
- unknown0
use the function integer()
for example:
integer(numericExpression)
this rounds the value of numericExpression to the nearest whole integer.
example:
put integer(3.75)
-- returns 4put integer(3.45)
-- returns 3Cheers.
- ********0
pure gold, thanks boz
- preston0
handy!