Macro Substitution

Robert Sneidar bobs at twft.com
Mon Oct 9 16:38:48 EDT 2006


Lemme cite an example of Macro Substitution:

put "/sbt/apdata1/apmast" into m0apmast
put "02" into m0company

now referring to &m0apmast.&m0company. would yield "/sbt/apdata1/ 
apmast02"

The ampersand is the Macro Substitution operator in Foxpro.

I think I can code around this. It's just that I am finding I am  
going to have to do a lot of recoding to make this port work.

Bob Sneidar
IT Manager
Logos Management
Calvary Chapel CM

On Oct 9, 2006, at 10:37 AM, Jan Schenkel wrote:

> --- Robert Sneidar <bobs at twft.com> wrote:
>> I am a bit stumped as to what to do to convert macro
>> substitutions in
>> the fox code I am porting. Macro substitution is
>> when I can refer to
>> a variable using a delimiter and the variable will
>> be substituted for
>> the value it contains at runtime. So if bobtest
>> contained "blah" then
>> I could "get $bobtest.1" and the code at runtime
>> would give me the
>> value of blah1. I won't go into the virtues of macro
>> substitution
>> here. There are times when it is quite handy.
>>
>> I know Revolution has no such convention. I am
>> hoping to avoid a lot
>> of extra coding to convert macro substitutions in
>> the Foxpro code.
>> Any ideas?
>>
>> Bob Sneidar
>>
>
> Hi Bob,
>
> Depending on the circumstances, you can use the 'do'
> command and 'value' function to achieve your goal.
> --
> on mouseUp
>   local blah1
>   put 40 into blah1
>   local bobtest
>   put "blah" into bobtest
>   answer value(bobtest & 1)
> end mouseUp
> --
>
> Hope this helped,
>
> Jan Schenkel.
>
> Quartam Reports for Revolution
> <http://www.quartam.com>
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same  
> time."  (La Rochefoucauld)
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list