Indirection (@) issues: Difference between revisions
From VistApedia
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Jim Self | Jim Self | ||
>Kevin wrote: | >Kevin wrote: | ||
>I posted about this once before, and it seems that someone had an | >I posted about this once before, and it seems that someone had an | ||
>answer. But I can't find that post now. | >answer. But I can't find that post now. | ||
That was me. It was in response to Nancy's question about indirection. | That was me. It was in response to Nancy's question about indirection. | ||
>I am trying to use indirection (@) to execute a callback function. | >I am trying to use indirection (@) to execute a callback function. | ||
>But it looks like the indirection is limited to 8 characters. | >But it looks like the indirection is limited to 8 characters. | ||
The form of indirection you are trying is not standard nor is it supported by GT.M. | The form of indirection you are trying is not standard nor is it supported by GT.M. | ||
> | > | ||
>e.g. | >e.g. | ||
> | > | ||
>GTM>w $$SIMPLE^TMGTEST("hello") | >GTM>w $$SIMPLE^TMGTEST("hello") | ||
>You said:hello | >You said:hello | ||
>GTM>set x="SIMPLE^TMGTEST" | >GTM>set x="SIMPLE^TMGTEST" | ||
> | > | ||
>GTM>w $$@x@("hello") | >GTM>w $$@x@("hello") | ||
>%GTM-E-LABELMISSING, Label referenced but not defined: SIMPLE^T | >%GTM-E-LABELMISSING, Label referenced but not defined: SIMPLE^T | ||
> | > | ||
>GTM> | >GTM> | ||
> | > | ||
> | > | ||
>How should I do this? | >How should I do this? | ||
Try putting the "$$" inside the quotes. | Try putting the "$$" inside the quotes. | ||
| Line 32: | Line 32: | ||
works for me. | works for me. | ||
s test="$$ucase^%zString" w @test@("hello kevin") | s test="$$ucase^%zString" w @test@("hello kevin") | ||
HELLO KEVIN | HELLO KEVIN | ||
Revision as of 13:17, 5 September 2005
Jim Self
>Kevin wrote:
>I posted about this once before, and it seems that someone had an
>answer. But I can't find that post now.
That was me. It was in response to Nancy's question about indirection.
>I am trying to use indirection (@) to execute a callback function.
>But it looks like the indirection is limited to 8 characters.
The form of indirection you are trying is not standard nor is it supported by GT.M.
>
>e.g.
>
>GTM>w $$SIMPLE^TMGTEST("hello")
>You said:hello
>GTM>set x="SIMPLE^TMGTEST"
>
>GTM>w $$@x@("hello")
>%GTM-E-LABELMISSING, Label referenced but not defined: SIMPLE^T
>
>GTM>
>
>
>How should I do this?
Try putting the "$$" inside the quotes.
I don't think this is standard either (or documented in GT.M for that matter), but this works for me.
s test="$$ucase^%zString" w @test@("hello kevin")
HELLO KEVIN