INTEGER FUNCTION GETMENU( ITEMCNT, DEFAULT, PROMPT, CHOICES )
INTEGER ITEMCNT ! number of choices
INTEGER DEFAULT ! Default return value
CHARACTER*(*) PROMPT ! Prompt for user
CHARACTER*(*) CHOICES( ITEMCNT ) ! array of menu choice strings
The number for the default response is displayed in square brackets at the end of the prompt [LIKE THIS]
NOTE: prompt and menu choice strings should have length at most 72 characters. Ideally, number of items should be at most 18; should be at most 999, in any case.
See also GETYN() , GETNUM() , GETREAL() , GETDBLE() , and GETSTR() .
...
INTEGER L
INTEGER GETMENU
CHARACTER*72 CHOICES( 4 )
DATA CHOICES
& / 'This is the first choice',
& 'This is the second choice',
& 'This is the third choice',
& 'This is the last choice' /
...
L = GETMENU( 4, 1, 'Choose one' )
...
To: Models-3/EDSS I/O API: The Help Pages