Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Translating day of the week
Message
De
08/03/2003 11:57:55
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
07/03/2003 12:56:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00753743
Message ID:
00763287
Vues:
16
>>The function seems short and good
>> However it does not work
>> It returns "invalid argument"
>>
>> I am using VFP 6
>> Is it only for VFP 7 or higher ?
>
>For VFP6, you may have to use the FOXTOOLS.FLL.
>
>SET LIBRARY TO x:\path2foxtools\foxtools.fll
>
>and replace the GETWORDNUM() function with the WORDNUM() function.

...and make sure the dDate is a date or datetime. My usual workaround for resolving version differences in case of these two functions (the other being GetWordCount() and Words()) is to have this somewhere in the beginning
#define v7 "07."$version()
#if v7
	#define words getwordcount
	#define wordnum getwordnum
#else
	do ckfoxtools
#endif
and this somewhere in the end
#if not v7
procedure ckfoxtools
*+ Foxtools Forever and Dark Beer Club. 12.3.2001

if atc("foxtools", set("library"))=0
	cFoxTools = fullpath('foxtools.fll')
	if not file(cFoxTools)
		cFoxTools=forcepath("foxtools.fll",sys(2004))
	endif
	if file(cFoxTools)
		set library to (cFoxTools) additive
	endif
endif
#endif
This works for stuff written in VFP6 or older, so I can keep using words() and wordnum(). For stuff written in VFP7 and later, the #define would have to be reversed; I'd have to
#define words getwordcount
#define wordnum getwordnum
in the "6 or older" branch of the #if...#endif.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform