Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Topic: Count same words from a text file Posted: 20 May 2014 at 5:31pm
Hi, I need to count each same words in a text file and show in the report each word and how many occurrence for each word. Can I use the split() to load the text file into an array and then how can identify and count the words?
Do you need to count certain words? or every single word?
If you need to count just certain words, you can use something like this
local numberVar count:= 0;
local stringVar name := Text;
Local numberVar strLen:=length(name);
local numberVar I;
for i:=1 to strLen do
If Mid(name,i,1)= "Word" then count := count +1;
count
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum