| **Navigation:**  [[templates.htm|Templates]] > [[tlrcontents.htm|Template Language Reference]] > Complete Alpha Listing >====== #QUERY (conditionally generate source) ====== | [[ purge delete all single or multi valued symbol instances .htm|{{btn_prev_n.gif|Previous page}}]][[tlrcontents.htm|{{btn_home_n.gif|Return to chapter overview}}]][[ read read one line of a source file .htm|{{btn_next_n.gif|Next page}}]] | | || **#QUERY( **//section, source//** )** {{blk2blue.jpg|blk2blue.jpg}} | **#QUERY** | Generates //source //if the named #SUSPEND //section// has been released. | | //section// | The name of the #SUSPEND section to #QUERY. | | //source// | The code to generate. | The **#QUERY** statement conditionally generates its //source //based on whether the named #SUSPEND //section// has been released (either explicitly or implicitly). If the #SUSPEND //section// has been released then #QUERTY generates its source, without affecting the release of any other nested #SUSPEND section it may be in--it does not create an implict #RELEASE. **Example:** **#SUSPEND(Fred)       #!Begin suspended generation section named "Fred"** **#?1** **#SUSPEND             #!Begin unnamed suspended generation section ** **#?2** **#QUERY****(Fred,'3')     #!Generate "3" only if the "Fred" section is released** **#?4** **#RESUME** **5                    #!Unconditional generation causes implicit #RELEASE of "Fred"** **#RESUME              #!End "Fred" section** ** #!The above code will generate 1, 3, 5 on successive output lines** ** #!The 2 and 4 don't generate because the unnamed section was not released** **See Also:     **[[ suspend begin conditional source .htm|#SUSPEND]]