Notices
The Basement Non-Honda/Acura discussion. Content should be tasteful and "primetime" safe.

Computer Programming Error...trouble counting strings

Thread Tools
 
Old Mar 31, 2005 | 01:34 PM
  #1  
Cannon's Avatar
Cannon
Thread Starter
Registered User
 
Joined: Jan 2005
Posts: 21
Likes: 0
From: High Desert, Sol Cal
Default Computer Programming Error...trouble counting strings

At work, we use primative programs. We are running FoxPro 2.5. I need to be able to have FoxPro scan a window that contains strings. I need it to count the individiual strings and return the counts for each string.

For example, if my window has:
AAA
AAA
BBB
CCC
CCC
CCC
DDD

.. I need to run a loop (Scan?) that will go through the window with these strings, look at each line, and return something like:

AAA = 2
BBB = 1
CCC = 3
DDD = 1

I am having great trouble. I either get nesting errors as I try to run If/Else statements inside a SCAN command OR I just cannot seem to reset my count to zero at the right time. This is the closest I have been able to get:

AAA = 1
AAA = 2
BBB = 3
CCC = 4
CCC = 5
...etc...

Anyone have any suggestions?

Thanks.

-Jeff
Reply
Old Mar 31, 2005 | 01:38 PM
  #2  
axemansean's Avatar
axemansean
Senior Member
 
Joined: Jun 2002
Posts: 13,634
Likes: 0
Default

Put your code on here and a link to where I can download a compiler, I'll try to help.

Edit - do a search on google, enough help out there for FoxPro.
Reply




All times are GMT -8. The time now is 04:32 AM.