User Tools

Site Tools


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

#ACCEPT

blk2blue.jpg

The #ACCEPT statement terminates #RESTRICT processing, indicating that the Template Code Section (#CODE, #CONTROL, #EXTENSION, #PROCEDURE, #PROGRAM, or #MODULE) is valid.

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

accept_section_valid_for_use_.htm.txt · Last modified: 2021/04/15 15:56 (external edit)