Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compiler does not catch this syntax error, bug?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00901990
Message ID:
00902661
Views:
16
Dawa,

You only need one & macro
function GetNames(lpcAlias,lpcIntoCursor,lpcCondition)
 select Upper(name) as Name ;
 from (lpcAlias) ;
 where &lpcCondition ;
 into cursor (pcIntoCursor)
endfunc
>In my code, I have situations where I would pass the alias name as a parameter. The reason is that I would create a temparary table based on a predefined structure, the table name is generated from sys(2015), in othercases, I would open a table "again" using a diffent alias. So macros are very helpful, for example:
>
>function GetNames(lpcAlias,lpcIntoCursor,lpcCondition)
> select (Upper(&lpcAlias..name)) as Name ;
> from &lpcAlias ;
> where &lpcCondition ;
> into cursor &pcIntoCursor
>endfunc && GetNames
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform