ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Re: C EST QUOI GETWORDCOUNT VFP9 DANS VFP6   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

sam. 04 novembre 2017, 11h48
ybenam
Algérie 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-file
vfp6 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
20 088 messages dans le forum • Liste complète des messages

Publicité

Les pubs en cours :


www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2024.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3