sam. 04 novembre 2017, 11h48
ybenam
Algérie
atoutfox.public.association
Re: C EST QUOI GETWORDCOUNT VFP9 DANS VFP6
Foxtools.fll est normalement distribué avec vfp6.
vous pouvez voir l'aide ici:
http://www.foxtools.com/foxtoolsfll-help-filevfp6 contient des fonctions Wordnum et Words qui seront intégrées dans les versions récentes de vfp :getWordNum et getWordcount.
WORDNUM(<ExpC1>, <ExpN>[,<ExpC2>])
Returns: Character
Description: Returns the <ExpN> word in <ExpC> delimited by any character in optional <ExpC2>.
The default for <ExpC2> is a space, tab and carriage return.
Example: ? WORDNUM("This is a test of FoxTools", 4) (returns: test)
? WORDNUM("One,Two:Three,Four,Five", 4, ":,") (returns: Four)
WORDS(<ExpC1>[,<ExpC2>])
Returns: Numeric
Description: Returns the number of words in <ExpC> delimited by any character in optional
<ExpC2>. The default for <ExpC2> is a space, tab and carriage return.
Example: ? WORDS("This is a test of FoxTools") (returns: 6)
*a small demo
set library to locfile(home(1)+"foxtools.fll") addi
local m.cc,m.n
m.cc = "Le ciel est bleu et l'herbe est verte."
messagebox("words:"+trans( WORDS(m.cc)) )
m.n=words(m.cc)
for i=1 to m.n
messagebox("Word"+trans(i)+"....."+wordnum(m.cc,m.i))
endfor
set library to
set library to
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000018569