SunQuest
 
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old March 8th, 2004, 07:54 AM
baronlynx baronlynx is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 2 baronlynx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how to count the occurence of the certain number in a variable

hi all,

i have a quite urgent problem to solve
i have the variable in the double format an i need to count the frequency of the appearance of the numbers?

does anybody seen an example of such an algorithm or have any idea how to solve the problem?

thanks in advance

--baronlynx--

Reply With Quote
  #2  
Old March 15th, 2004, 01:23 AM
Stev Stev is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Queensland, Australia
Posts: 256 Stev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 53 sec
Reputation Power: 5
To clarify the problem....

You want to split the number up into it's digits and count how many times each digit occurs?

Use a combination of INT() and Mod functions to get the last digit and remove it. Repeat until you have all the digits.

12345 Mod 10 = 5
int(12345/10) = 1234

Hope this helps

Last edited by Stev : March 15th, 2004 at 01:26 AM.

Reply With Quote
  #3  
Old June 19th, 2004, 07:35 PM
baronlynx baronlynx is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 2 baronlynx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanx

it's been a while and i forgot tho thank you for help

thanx a lot

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > how to count the occurence of the certain number in a variable


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway