[Omake] defining a function
Aleksey Nogin
nogin at metaprl.org
Tue Jul 24 21:49:45 PDT 2007
On 23.07.2007 15:39, Sam Steingold wrote:
> $(foreach my_save, $@)
Sam,
First, my_save above is a literal string, you need to use $(my_save) if
you want to refer to the value of the my_save variable (i.e. the my_save
function)
Second, the above syntax means "call the foreach function _and_ then run
the result as a shell expression". Obviously the second part is not what
you intended. In case you simply want to call a function and drop its
result on the floor, you need to use the
f(arg, arg, ...)
syntax.
In short, you need to use
foreach($(my_save), $@)
Aleksey
More information about the Omake
mailing list