Problem with functions in conversion to vfp6  
Author Message
bertle





PostPosted: Visual FoxPro General, Problem with functions in conversion to vfp6 Top

I converted an application from FoxPro 2.5 to VFP6 almost everything works fine but I’m having problems with the functions and the variables on some of the prg files with the procedures I had no problem, all I did was Do procedure in “file where procedure is” but I don’t know what to do for the variables and the functions. I tried set procedure for the functions but it didn’t work. I would really appreciate if someone could tell me how to get them to work.



Visual FoxPro2  
 
 
Don Higgins





PostPosted: Visual FoxPro General, Problem with functions in conversion to vfp6 Top

There is no magic, the same code *should* run in VFP. Some minor mods will be needed.

Without posting the code that does not work we are all in the dark.



 
 
Tamar E. Granor





PostPosted: Visual FoxPro General, Problem with functions in conversion to vfp6 Top

You'll need to tell us more about the problems you're having. One thing to be aware of is that the parser got stricter, so that some things that were okay in older versions cause syntax errors now. For example, if you miss a comma in variable declarations, it'll fail:

PUBLIC x y z

triggers an error.

Tamar

 
 
CetinBasoz





PostPosted: Visual FoxPro General, Problem with functions in conversion to vfp6 Top

"I tried set procedure for the functions but it didn’t work"

What exactly didn't work Any error message

Maybe you're specifying the fullpath to the procedure file and doing that in such a way that long file name is failing (ie: macro expansion)

lcProcedureFile = "c:\my application\progs\vfputils.prg"

This would fail:

set procedure to &lcProcedureFile

this would do:

set procedure to (m.lcProcedureFile)