SeeView Manual
SeeView Language Elements
HP NonStop SeeView Manual—526355-004
5-28
Window Productions
Window Productions
The WINDOW statement PRODUCTION option associates a default production with 
nonmenu windows. This option can even associate a production with an edit-mode 
window. 
Example 5-13 shows a program that displays the definition of the word selected by the 
cursor when you press SF10.
When the program in Example 5-13 is invoked:
•
?MENU Dictionary declares a cache named Dictionary and stores the definitions of 
the words that follow the ?MENU directive.
•
?SECT Main starts a Seedit task and displays a window on the Seedit task. The 
window has the production “CALL Webster(#MENUTOKEN)” associated with it. 
This production is executed when you press a function key that was specified with 
the WINDOW statement KEYS option.
•
?PROC Webster is called when you press SF10. The #word of text selected by the 
cursor position is passed to the procedure via the #MENUTOKEN intrinsic. The 
procedure then searches the Dictionary cache for the #word. 
If #word is not found, a message indicates “No definition for this word.”
Example 5-13. Example of a Nonmenu Window Production
?MENU Dictionary                     
{---------------}                     
 Apple = A round, firm, fleshy, edible fruit with a        
   green, yellow, or red skin and small seeds.          
 *                     
 Banana = A long, narrow, somewhat curved fruit that has a sweet, 
  creamy flesh covered by a yellowish, or reddish skin.    
 *                     
 Orange = A reddish-yellow, round, edible citrus         
     fruit, with a sweet, juicy pulp.               
 *                     
?PROC Webster( #word )                    
{--------------------} Lookup #word in dictionary       
 PARM #word;                     
 VAR  WordFound;                    
 SEARCH Dictionary CACHE #word & " =" -> WordFound;        
 IF WordFound<0 THEN BEGIN 
 MSG "No definition for this word"; 
 RETURN; 
 END; 
 BELOW;                     
 WINDOW Dictionary CACHE INDEX WordFound { Display definition 
 UNTIL "*" NOSILL; { in "dictionary". 
?SECT Main                     
{---------}                     
 TASK  seedit CACHE 100;                   
 WINDOW seedit PRODUCTION "CALL Webster( #MENUTOKEN )" 
 KEYS SF10 
 NOGLASS CACHE SIZE 70,12;










