Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 09-28-2005, 04:02 AM   #1
Beta Member
 
Join Date: Sep 2005
Posts: 2
Default Character counter

Hi,

I have an holiday assignment and I am still very new in programming.
One part of the program is asking for a character counter. A sentence must be typed into an input field. When a Count button is pressed the system must count how many times each character is in the sentence. Only characters that are present in the sentence must be counted and displayed in a listbox. (Example A:2)

I need help in how to count the letters in the input field and how to display it into a listbox as in the example (A:2 or O:1).
__________________

Lanie is offline   Reply With Quote
Old 09-28-2005, 04:20 AM   #2
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: Character counter

what language does this have to be written in?
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 09-28-2005, 04:22 AM   #3
Beta Member
 
Join Date: Sep 2005
Posts: 2
Default Re: Character counter

Visual Basics.Net
Lanie is offline   Reply With Quote
Old 09-28-2005, 04:27 AM   #4
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: Character counter

StrText = "How long is this text?"
l = StrText.Length


Hope that helps...
I didn't write the delcaration of variables, or anything like that since it's an assignment, but that should be most of it done for you!!
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 05:10 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0