Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 8:16 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Integer a variable
PostPosted: January 4th, 2008, 11:58 am 
Offline

Joined: September 8th, 2007, 2:05 pm
Posts: 7
Hi to all... I want to integer a number, but my problem is just want the number before the point without change, and when the first decimal is bigger than 5 it increase in one... I am not sure if I am explaining myslef... sorry for my english...:)

Example-... I have the number 5.8... I want to get the variable num=5 but if I use the code: num= String.integer(num) it is going to be 6.

How I can get only the number before the point?

Thanks a lot for the help.

Louri


Top
 Profile  
 
 Post subject:
PostPosted: January 4th, 2008, 3:13 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
You need to use the Math.floor function.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group