counting ASCII codes...

1. Senior Member
Join Date
Dec 1969
Posts
1,570

## counting ASCII codes...

where the value could be up to a ten character long number. <BR><BR>i.e. the value could equal 1234567890 or 0987654321, or any combination of the those numbers. The value could be 0 or could be 334, etc. Any combination and length up to 10 digits! I need to build a loop that will calculate total ASCII decimal value for whatever the value happens to be. Is there functions out there built to do this, or am I going to have to wrack my brain figuring this one out? Any ideas, thoughts, suggestions, and examples are all greatly appreciated!!<BR><BR>rob

2. Senior Member
Join Date
Dec 1969
Posts
1,570

## RE: counting ASCII codes...

I guess the value would never begin with a zero... <BR><BR>1 - 9999999999

3. Senior Member
Join Date
Dec 1969
Posts
11,334

## Doesn't seem possible

I mean, how will you know if they mean ascii 6, and 5, or 65? Unless they specify all digits will be 3 chars long, I don&#039;t see how you can pull a bunch of codes outta there.<BR><BR>Why don&#039;t they just pass you the stupid values in a different way?

4. Senior Member
Join Date
Dec 1969
Posts
96,118

## Agree with DG...

...unless you mean you simply need the sum of the ASC values of each character. <BR><BR>What possible use is that, though?<BR><BR>Oh, well:<BR><BR>&#060;%<BR>sum = 0<BR>For i = 1 To Len(theValue)<BR> sum = sum + Asc( Mid( theValue, i, 1 ) )<BR>Next<BR>%&#062;<BR><BR>Seems really silly, though.<BR><BR>

5. Senior Member
Join Date
Dec 1969
Posts
1,570

## RE: Doesn't seem possible

the value would either be a 6 or a 5, or 65. The ASCII value for 6 is 54, 5 is 53, and for 65 it is 107. I am sure you knew that, so you don&#039;t think it is possible to pull in the value for the user (his/her key) and do the ASCII calculation?

6. Senior Member
Join Date
Dec 1969
Posts
1,570

## RE: Agree with DG...

thats it bill. The mastermind you are!!! Thanks alot.

7. Senior Member
Join Date
Dec 1969
Posts
11,334

## Oh, I misread that then

I thought he had a string of chars, say "A" = 65 and he had to parse 65 outta that string... didn&#039;t know he wanted the totals.<BR><BR>I wonder what you do with the total then?

8. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## Let me ask you this

what in the world are you gonna do with that number??<BR><BR><BR>

9. Senior Member
Join Date
Dec 1969
Posts
1,570

## RE: Oh, I misread that then

it is going to be part of a querystring, and it represents a checksum value...

10. Senior Member
Join Date
Dec 1969
Posts
11,334

## Good, I wasn't the only one

who didn&#039;t get that.<BR><BR>At first I thought it woulda been some sorta password thing.<BR><BR>Glad I wasn&#039;t the only one wondering here..

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•