Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 06-25-2001, 02:27 PM   #1
Member (10 bit)
 
Join Date: May 1999
Location: Orlando, FL
Posts: 975
Send a message via ICQ to artsapimp
ASP Cint, dbl, etc.

How would I make a number 16 characters long (CC Number) display on the screen without any deformation?
Code:
intNumber = 1234567812345678
Response.Write(intNumber)
I keep getting this...
1.23456781234568E+15

Thanks for any help.
artsapimp is offline   Reply With Quote
Old 06-26-2001, 12:43 AM   #2
Member (7 bit)
 
Join Date: Feb 2001
Location: Maine
Posts: 69
Send a message via ICQ to Rooster
I believe that single will work. Try that, then double if it doesnt work.
Rooster is offline   Reply With Quote
Old 06-26-2001, 03:08 AM   #3
SQL nutcase
 
mosquito's Avatar
 
Join Date: Sep 2000
Location: Belgium
Posts: 1,136
Send a message via AIM to mosquito
or use
Code:
intNumber = 1234567812345678
Response.Write(format(intNumber, "##################"))
This way the result is formatted, and not converted, which is what you want to do.
mosquito is offline   Reply With Quote
Old 06-26-2001, 10:15 AM   #4
Member (10 bit)
 
Join Date: May 1999
Location: Orlando, FL
Posts: 975
Send a message via ICQ to artsapimp
Thank you very much, but I'm getting an error when I apply that.

Error Type:
Microsoft vb-script runtime (0x800A000D)
Type mismatch: 'format'
/nam/datamerge/data.asp, line 105
artsapimp is offline   Reply With Quote
Old 06-26-2001, 06:45 PM   #5
Member (7 bit)
 
Join Date: Feb 2001
Location: Maine
Posts: 69
Send a message via ICQ to Rooster
An integer variable won't store that many characters. It will only store numbers up to 32,172 (or something like that). Have you tried the single or double variable types yet? You may wanna try one of those variable types using the format mosquito suggested.
Rooster is offline   Reply With Quote
Old 06-27-2001, 04:04 AM   #6
SQL nutcase
 
mosquito's Avatar
 
Join Date: Sep 2000
Location: Belgium
Posts: 1,136
Send a message via AIM to mosquito
you have to lookup if it's with format, It's possible that there is a function formatstring or something (I took this from visual basic, not from vbscript.) I'll look it up when I have some time.
mosquito is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:59 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2