| **Navigation:**  [[templates.htm|Templates]] > [[tlrcontents.htm|Template Language Reference]] > Complete Alpha Listing >====== #PREPARE (setup prompt symbols) {{c6h0068.jpg|C6H0068.jpg}} ====== | [[ preembed generate beginning embed point comments .htm|{{btn_prev_n.gif|Previous page}}]][[tlrcontents.htm|{{btn_home_n.gif|Return to chapter overview}}]][[ print print a source file .htm|{{btn_next_n.gif|Next page}}]] | | || **#PREPARE** //statements// **#ENDPREPARE** {{blk2blue.jpg|blk2blue.jpg}} | **#PREPARE** | Begins a prompts symbol setup section. | | //statements// | Template language statements to fix multi-valued symbols to the values needed to process the #PROMPT or #BUTTON statement preceding the #PREPARE. | | **#ENDPREPARE** | Terminates the section. | The **#PREPARE** structure contains Template language statements to fix multi-valued symbols to the values needed to process the #PROMPT or #BUTTON statements preceding the #PREPARE. A #PREPARE section that precedes all the prompts is executed once, before the prompts are added to a window. In particular, if the prompts are displayed on the procedure properties screen, editing the window definition and returning does not execute the prepare code. **Example:** **#CODE (SetProperty, 'Set a property on a control')** **#PREPARE** **  #DECLARE(%Choices),MULTI** **  #DECLARE(%NextLine)** **  #FREE(%Choices)** **  #OPEN('property.clw'),READ** **  #READ(%NextLine)** **  #LOOP WHILE(%NextLine <;> %Eof)** **    #! Exclude PROPLIST: properties** **    #IF (SUB(%NextLine, 1, 5) = 'PROP:')** **      #ADD(%Choices, SUB(%NextLine, 1, INSTRING(' ',%NextLine)-1))** **    #END** **    #READ (%NextLine)** **  #END** **  #CLOSE,READ** **#ENDPREPARE** **#PROMPT('Control:', FROM(%Control)),%Target** **#PROMPT('Property:', FROM(%Choices)),%Selection** **#PROMPT('Value:', @s255),%TargetValue** **%target{%Selection} = %TargetValue**