On 9/9/04 8:42 PM, Arthur Urban wrote:
I'm trying to use the param() function, but it is behaving "badly". Here is
the meat of the issue. Consider this fragment, param(1) = 'card "CardName"
verified in variable watcher':

  put fld "F" of param(1) is empty into x

The above code blows up stating that fld "F" cannot be found. However, if I
add a line as follows:

  put param(1) into tCard
  put fld "F" of tCard is empty into x

This works!(?) Why can't I just use param(1)? The "documentation" implies
that I've used it correctly.

The parameter will be interpreted as a text string, and the engine will see it like this:


  put fld "F" of "card 'CardName'" is empty into x

This doesn't compile. By putting it into a variable first, you've forced the engine to evaluate it. You can also do evalution using the "do" command like this:

do "put fld" && quote & "F" & quote && "of" && param(1) && "is empty into x"

but that is not only hard to read, it requires that the script load the compiler every time that line runs. Your second way is cleaner.

--
Jacqueline Landman Gay         |     [EMAIL PROTECTED]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to