Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

does VBS have mathematical limitations?

Status
Not open for further replies.

MikeT

IS-IT--Management
Feb 1, 2001
376
US
To calculate percents, I use a variable that represents the number "33.33333". However, when I perform ANY mathematical operation to this number, the result is always blank; not zero, not negatives, not anything! Since its a percentage, I need to divide it by 100, but it doen't work. I even tried to simply add "1" to it, still nothing.
Whats the deal?

 
I just took that number, assigned it to a variable, multiplied that by 100, wrote the output to screen, and received:

3333.333

Post the problematic code... then maybe we can figure out what's wrong..

Paul Prewett
 
The number is retrived from an Access database.
It is retrieved as 33.33333. It prints ok when i response.write it:

temp = rs("damnumber")
response.write temp REM this works fine
response.write (temp/100)&&quot;<--&quot;

And guess what.....nothing. I put the arrow in to let me know where to look for it, but even the arrow doesn't print!!! Yes, i tried it without the arrow, too. This takes place at the beginning of the page, before the rest of the code becomes relavent.

I'm looking forward to going home tonight...
 
33.33333
0.3333333<--


That's my output from substituting the number for the rs(&quot;damnnumber&quot;)

did you try to maybe cdbl(rs(&quot;damnumber&quot;)) ???

Who knows --

:-(
 
in javascript I would use:

temp = new Number(rs(&quot;damnumber&quot;).Value)
Response.write(temp/100)

maybe there is something similar in vbs jaredn@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top