User Tools

Site Tools


reject_section_invalid_for_use_.htm
Navigation:  Templates > Template Language Reference > Complete Alpha Listing >====== #REJECT (section invalid for use) C6H0068.jpg ====== Previous pageReturn to chapter overviewNext page

#REJECT

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 ,#ACCEPT

reject_section_invalid_for_use_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)