473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

getting a whole number

le0
Hi Guys,

Can you help me with this? Is there any function that I can use in getting a
whole number

Example:

Input OutPut
12.3 12
1.63 1
21.1 21

Im using the function left(p1,p2) but it doesnt recognize the whole number

Please help thanks =)
Aug 8 '06 #1
6 4235

le0 wrote:
Can you help me with this? Is there any function that I can use in getting a
whole number
Look up the help topics for Round, CInt and FormatNumber and decide
which is best for you to use -- it depends on what you're trying to
achieve.

Aug 8 '06 #2

"Bobbo" <ro******@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
>
le0 wrote:
Can you help me with this? Is there any function that I can use in
getting a
whole number

Look up the help topics for Round, CInt and FormatNumber and decide
which is best for you to use -- it depends on what you're trying to
achieve.
None of the above. ;)

Int is the function needed

Eg.

Int(1.62) = 1
Aug 8 '06 #3

Anthony Jones wrote:
>
None of the above. ;)

Int is the function needed
Thanks Anthony, I stand corrected!

I -- incorrectly -- remembered that CInt behaved like that. Guess it's
been too long since I've done classic ASP! :-)

Aug 8 '06 #4
Anthony Jones wrote:
Int is the function needed

Eg.

Int(1.62) = 1
Depending on the desired behavior for negative numbers, yes. Otherwise Fix()
is the one.

And since this is an ASP forum, not a VBScript one, it is worth noting that
Math.floor() does the same as Int().

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 8 '06 #5
Dave Anderson wrote on 08 aug 2006 in
microsoft.public.inetserver.asp.general:
Anthony Jones wrote:
>Int is the function needed

Eg.

Int(1.62) = 1

Depending on the desired behavior for negative numbers, yes. Otherwise
Fix() is the one.

And since this is an ASP forum, not a VBScript one, it is worth noting
that Math.floor() does the same as Int().
... if you are using j[ava]script as asp serverside language.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 9 '06 #6
le0
Thanks guys =)

"le0" <le*********@gmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi Guys,

Can you help me with this? Is there any function that I can use in getting
a whole number

Example:

Input OutPut
12.3 12
1.63 1
21.1 21

Im using the function left(p1,p2) but it doesnt recognize the whole number

Please help thanks =)


Aug 10 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
4
by: Sondra Wilson | last post by:
I have created a sorted query. The total(records) I get in the query is correct. My problem lies with getting that total into my report. I use count to insert the total number of records in my...
15
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
3
by: David Marsh | last post by:
The program calculates the continued fraction representation of the input: #include <stdio.h> #include <stdlib.h> int main(int argc, char* argv) { double diff, n, r, i; if(argc != 2)...
4
by: Will | last post by:
Hey guys Quick question: how do i find out if the remainder of 4 divided by 2 is a whole number ? NEED CODE PLEAS THANX IN ADVANCE
5
by: John | last post by:
Which variable type (c#) can whole the largest whole number? I know this sounds silly but as double and decimal are made for numbers with decimals I am not sure. Also if anybody knows of any...
2
by: Dr_PoLish (the schnitzel) | last post by:
Hey, I've been developing an app that would basically clone the functionality that apt-get does for debian and port it to windows. Yes, the whole deal - repositories, .deb clones (in this case,...
5
by: rn5a | last post by:
A Web Form has a TextBox within a DataGrid wherein users are expected to enter only whole numbers. It should be validated so that the TextBox doesn't remain blank or any non-numeric data is...
2
praclarush
by: praclarush | last post by:
php version 5.2.5 well here’s the problem, I have this home work for a class, in it we just had to copy things out of the book as they have it and follow along basically. Then the teacher add...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.