Reading the procedure template's symbols from an extension's #PREPARE

Applies to: a procedure extension used with a third-party procedure template (NetTalk), as reported in March 2019; no Clarion version named.

Problem

An extension template needed two settings to match settings of the procedure template it extends. Inside #AT the procedure template symbols were readable. In #PREPARE they raised errors that the symbol does not exist, because they are out of scope. An #ERROR() added in #ATSTART was lost in the generation output.

Solution

  1. Use #CONTEXT in the #PREPARE section to reach the procedure template's symbols (Lee W.'s one-word answer).
  2. The poster reported it "worked perfectly" and used it to show a red warning text when the names differ and a green one when they match.
  3. Scope notes from the thread: #PREPARE only affects the prompt interface; once an #AT statement is reached it no longer applies. The help is quoted: #PREPARE "contains Template language statements to fix multi-valued symbols to the values needed to process the #PROMPT or #BUTTON statements preceding" it. It can also call groups and be used inside #TAB and #BUTTON.

Caveats

  • The answer is a single keyword with no code in the thread; the exact syntax is in the help for #CONTEXT.
  • A later poster felt #PREPARE and #CONTEXT do not combine easily and that duplicate fields should be avoided; no details were given.
  • Another poster pointed to a DebugView output example posted elsewhere to watch what the template does.

Today (2026)

Likely still valid; not re-tested on a current build.

Sources: Arnor B. (Mar 2019, the question), Lee W. (Mar 2019), Jeff M. (Apr 2019), Graham D. (Apr 2019) in softvelocity.clarion.templates.