Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 file name functions
Message
From
01/02/2000 03:21:31
 
 
To
31/01/2000 18:17:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00324545
Message ID:
00325467
Views:
36
>>Your example is a bit single use isn't it? How do you pass it another path?
>
>Ahhh....
>
>local lcDBFPath
>?eval(chr(106) + chr(117) + chr(115) + chr(116) + chr(115) + chr(116) + chr(101) + chr(109) + chr(40) + chr(34) + lcDBFPath + chr(34) + chr(41))

The variable should be global. That way the simple expression you wrote can be used aywhere in the application. Better yet...

#define FUNKY_EVAL_PARAMETER "somepath"

#include FUNKY_EVAL.H

? FUNCKY_EVAL_BEGIN FUNKY_EVAL_PARAMETER FUNKY_EVAL_END

Where FUNKY_EVAL.H contains...

#define FUNKY_EVAL_BEGIN eval(chr(106)+chr(117)+chr(115)+chr(116)+chr(115)+chr(116)+chr(101)+chr(109)+chr(40)+chr(34)+
#define FUNKY_EVAL_END +chr(34)+chr(41))

Or for the oldtime xbase coders...

private M.FKY_EVL_PR
STOR "somepath" to M.FKY_EVL_PR

SET PROC TO FNKY_EVL.PRG

DO FKY_EVL_PR

Where FNKY_EVL.PRG contains...

PROC FKY_EVL_PR
STOR "EVAL(CHR(106)+CHR(117)+CHR(115)+CHR(116)+CHR(115)+CHR(116)+CHR(101)+CHR(109)+CHR(40)+CHR(34)+" TO FKY_EVL_BG
STOR " +CHR(34)+CHR(41))" TO FKY_EVL_ED
?&FKY_EVL_BG.M.FKY_EVL_PR&FKY_EVL_ED
RETU
Previous
Reply
Map
View

Click here to load this message in the networking platform