On Thu, 20 Apr 2017 15:14:55 -0700, Gene Wirchenko <[email protected]> wrote:

>Hello:
>
>      Suppose I wish to refer to a column.  I have the alias in 
>*text* form.  What is the best way to access the column?  By best, I 
>mean a short, clear way
>that:
>   1) can be used in both reads or writes on the column and
>   2) is in-line: I do not want to have to define a variable with an 
>expression and then use that in a later line.
>
>      I have the rather ugly
>           evaluate(aliasasstr+".colname")
>which I have used for years on occasion.  Now, I am modifying a 
>report where I will have to use this sort of access more than a few times.
>
>      Am I overlooking something cleaner?

Why not macro substitution?

&aliasasstr..colname

Note that the two dots are mandatory.

In many cases it is better to use macros because they are expanded and 
interpreted only one time.

For example in sql query, in filter condition, in for clauses.

-- 
Gianni

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to