Macro Substitution

Jan Schenkel janschenkel at yahoo.com
Mon Oct 9 13:37:46 EDT 2006


--- 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 



More information about the Use-livecode mailing list