473,321 Members | 1,778 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,321 software developers and data experts.

Type validation

Is there method to verify that a value is integer and not double

Thank you,
Samuel
Jul 27 '06 #1
6 1198
You can take its ceiling or floor, and compare it to the original value. If
they are the same, then it is an integer.

"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:Oe**************@TK2MSFTNGP03.phx.gbl...
Is there method to verify that a value is integer and not double

Thank you,
Samuel


Jul 27 '06 #2
Thanks

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:ux**************@TK2MSFTNGP04.phx.gbl...
You can take its ceiling or floor, and compare it to the original value.
If they are the same, then it is an integer.

"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:Oe**************@TK2MSFTNGP03.phx.gbl...
>Is there method to verify that a value is integer and not double

Thank you,
Samuel



Jul 27 '06 #3
Let's see if anyone guesses what is the
ceiling of 10.000000000000001D

:)

-tom

Samuel Shulman ha scritto:
Thanks

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:ux**************@TK2MSFTNGP04.phx.gbl...
You can take its ceiling or floor, and compare it to the original value.
If they are the same, then it is an integer.

"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:Oe**************@TK2MSFTNGP03.phx.gbl...
Is there method to verify that a value is integer and not double

Thank you,
Samuel

Jul 27 '06 #4
11
<to**************@uniroma1.itwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
Let's see if anyone guesses what is the
ceiling of 10.000000000000001D

:)

-tom

Samuel Shulman ha scritto:
>Thanks

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:ux**************@TK2MSFTNGP04.phx.gbl...
You can take its ceiling or floor, and compare it to the original
value.
If they are the same, then it is an integer.

"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:Oe**************@TK2MSFTNGP03.phx.gbl...
Is there method to verify that a value is integer and not double

Thank you,
Samuel


Jul 27 '06 #5
:) try

MsgBox(Math.Ceiling(10.000000000000001D))

with both VB2003 and then with VB 2005. You will see at MS
have changed opinion about the result :)

-tom

Samuel Shulman ha scritto:
11
<to**************@uniroma1.itwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
Let's see if anyone guesses what is the
ceiling of 10.000000000000001D

:)

-tom

Samuel Shulman ha scritto:
Thanks

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:ux**************@TK2MSFTNGP04.phx.gbl...
You can take its ceiling or floor, and compare it to the original
value.
If they are the same, then it is an integer.

"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:Oe**************@TK2MSFTNGP03.phx.gbl...
Is there method to verify that a value is integer and not double

Thank you,
Samuel
Jul 27 '06 #6
Any explanation?
<to**************@uniroma1.itwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
:) try

MsgBox(Math.Ceiling(10.000000000000001D))

with both VB2003 and then with VB 2005. You will see at MS
have changed opinion about the result :)

-tom

Samuel Shulman ha scritto:
>11
<to**************@uniroma1.itwrote in message
news:11*********************@i3g2000cwc.googlegro ups.com...
Let's see if anyone guesses what is the
ceiling of 10.000000000000001D

:)

-tom

Samuel Shulman ha scritto:

Thanks

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:ux**************@TK2MSFTNGP04.phx.gbl...
You can take its ceiling or floor, and compare it to the original
value.
If they are the same, then it is an integer.

"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:Oe**************@TK2MSFTNGP03.phx.gbl...
Is there method to verify that a value is integer and not double

Thank you,
Samuel



Jul 27 '06 #7

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

Similar topics

6
by: Boyd Reilly | last post by:
I have a form that has the user pick the type of question he will answer. The input field will be a text, numeric or date type. So, after the question is answered, I need to change the input...
31
by: xah | last post by:
what's the pro and con of using <script language="javascript"> vs <script type="text/javascript"> Xah xah@xahlee.org ∑ http://xahlee.org/
6
by: SHC | last post by:
Hi all, I created an application from the Console Application (.NET) of VC++ .NET 2003, and I did "Build" the application of the attached .cpp file, volcanoes.xml and geology.dtd on my VC++ .NET...
9
by: Bob | last post by:
I have a sql command with a SearchDate parameter of type date. When I execute its stored procedure from Query Analyzer (to SS2K) with a date out of the valid datetime range, EXEC @SearchDate =...
1
by: baroque Chou | last post by:
I add validation control to my page, but it seems it dosn't work using input. is it true?
1
by: PeterW | last post by:
I have a bit of xml that I am trying to create an xsd schema from. A very simplified version is as follows: <?xml version="1.0" encoding="UTF-8"?> <centre...
1
by: SkipNRun | last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list. ...
5
by: mknoll217 | last post by:
I am a newbie at XML. I have been given an xml document that I need to write the schema for, for a class assignment. The xml given to me is <?xml version="1.0"?> <Vendors> <Vendor> ...
9
hsriat
by: hsriat | last post by:
How can I add my validation script to this file upload code? Validation Script:function validate(frm) { if (!/(\.(gif|jpg|jpeg|png))$/i.test(frm.file.value)){ alert('Invalid file...
2
by: underground | last post by:
I have a query I use to insert data and text into my DB. The script provides the validation for the file size not type is assigned, how do I add the file type validation to this script. Could someone...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.