Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in vfp9 not in vfp8
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01014630
Message ID:
01014637
Views:
22
Yes, chr(13) causes the error because it breakes a command in the macro substitution into 2 lines. VFP9 doesn't allow that anymore. It's not clear why do you need macro substitution in the first place.
m.cProp = "thisform.lblRoom.caption"
STORE m.cName TO (m.cProp)
>I'm getting an "Unrecognized Phrase\Keyword" error in vfp9 but the same statement works fine in vfp8.
>
>I'm using macro expansion in order to set a caption on a label. I just converted my app from v8 to v9 and the problem started.
>Here is what takes place:
>
>*********************************************
>*initialize variables
>local m.cName,m.cMacro
>
>*Store Name to var
>m.cName = 'bla bla ' + chr(13) + 'alb alb'
>
>*Store command to var
>m.cMacro = "thisform.lblRoom.caption = ' " + m.cName + " ' "
>
>*Execute command
>&cMacro. &&This line causes the error....works in v8 not in v9
>
>*********************************************
>
>Whats strange to me is that I can set the label's caption without using macro expansion and I do not get an error in v9.
>ex. thisform.lblroom.caption = 'bla bla ' + chr(13) + ' alb alb'
>
>The chr(13) is what seems to be causing the problem since setting the caption using macro expansion works as long as there is no chr(13).
>
>Any help is appreciated.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform