# An extension template cannot change the procedure's %Prototype; how to enforce the parameters it needs

**URL:** <https://forums.softvelocity.com/t/an-extension-template-cannot-change-the-procedures-prototype-how-to-enforce-the-parameters-it-needs/326>\
**Category:** Knowledge Base\
**Tags:** templates, unverified\
**Created:** [November 9, 2026, 12:50am UTC](https://forums.softvelocity.com/t/an-extension-template-cannot-change-the-procedures-prototype-how-to-enforce-the-parameters-it-needs/326 "2026-11-09T00:50:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rzaunere](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rzaunere](https://forums.softvelocity.com/u/rzaunere)\
**Post date:** [November 9, 2026, 12:50am UTC](https://forums.softvelocity.com/t/an-extension-template-cannot-change-the-procedures-prototype-how-to-enforce-the-parameters-it-needs/326/1 "2026-11-09T00:50:41Z")

</div>

**Applies to:** posted in the softvelocity.clarion.templates group in 2015; the thread names no Clarion version. An extension template on an existing procedure template.

**Problem**

An extension template needed to set the procedure's prototype and parameters. In `#CONTEXT(%Procedure)`, `#SET(%Parameters,'(Stringtheory pX)')` worked, but `#SET(%Prototype,'(Stringtheory pX)')` did not: `%Prototype` is read only. The template reference says `#PROTOTYPE` can be used only from a `#PROCEDURE` template and only if one has not been used already, so an extension had no way to force it.

**Solution**

1. Do not try to set `%Prototype` from an extension. One answerer did not know a way; another believed it is a read-only built-in symbol.
2. Check the prototype instead, in the extension's `#ATSTART` embed, and raise an error:

```auto
#IF(Instring('stringtheory',LOWER(%Prototype),1,1) = 0
  #ERROR(%Procedure & ': MyTemplate needs "Stringtheory" parameter - see MyTemplate documentation')
#ENDIF

```

1. Make the message name both the procedure and the template causing it, and point to the help that explains the fix. A bare "incorrect prototype" text says little.

**Caveats**

- The error then tells the user to fix the prototype by hand; the template does not do it.
- One poster said the new IDE of that time lists `#ERROR` text in its error window.
- The poster called the `#ERROR` route reasonable; nobody tried another way.

**Today (2026)**

Likely unchanged, as `%Prototype` is a symbol the IDE owns; not re-tested on a current build.

**Sources:** Kevin D. (Apr 2015, the question), Arnor B. (Apr 2015), Mike H. (Apr 2015) in softvelocity.clarion.templates.
