| **Navigation:**  [[templates.htm|Templates]] > [[tlrcontents.htm|Template Language Reference]] > Complete Alpha Listing >====== #REJECT (section invalid for use) {{c6h0068.jpg|C6H0068.jpg}} ====== | [[ redirect change source file .htm|{{btn_prev_n.gif|Previous page}}]][[tlrcontents.htm|{{btn_home_n.gif|Return to chapter overview}}]][[ release commit conditional source generation .htm|{{btn_next_n.gif|Next page}}]] | | || **#REJECT** {{blk2blue.jpg|blk2blue.jpg}} The **#REJECT** statement terminates #RESTRICT processing, indicating that the Template Code Section (#CODE, #CONTROL, #EXTENSION, #PROCEDURE, #PROGRAM, or #MODULE) is invalid. The #RESTRICT structure contains Template language //statements// that evaluate the propriety of generating the section's source code. The #ACCEPT statement may be used to explicitly declare the section as appropriate. An implicit #ACCEPT also occurs if the #RESTRICT //statements// execute without encountering a #REJECT statement. The #REJECT statement must be used to specifically exclude the section from use. Both the #ACCEPT and #REJECT statements immediately terminate processing of the #RESTRICT code. **Example:** #CODE(ChangeControlSize,'Change control size') #WHERE(%EventHandling) #RESTRICT #CASE(%ControlType) #OF 'LIST' #OROF 'BUTTON' #REJECT #ELSE #ACCEPT #ENDCASE #ENDRESTRICT #PROMPT('Control to change',CONTROL),%MyField,REQ #PROMPT('New Width',@n04),%NewWidth #PROMPT('New Height',@n04),%NewHeight %MyField{PROP:Width} = %NewWidth %MyField{PROP:Height} = %NewHeight **See Also:     **[[ restrict define section use constraints .htm|#RESTRICT]] ,[[ accept section valid for use .htm|#ACCEPT]]