This example demonstrates the use of INMEMO to display a pop-up pick-list of choices that is built on the fly. A situation where this would be useful is where a partial lookup key has been entered and now you want to retrieve a list of all the values that match the partial key, display them in a pick-list, and allow the operator to choose from the list.
KEY$ = <partial key>
CALL PICK'LIST ! (returns TEXT of choice)
IF TEXT="" GOTO <back to input a new partial key>
...
PICK'LIST:
TEXT = TITLE$ + chr$(13) + "Return to select,&
ESC to abort" + "~" VROWS = 1
FOR <each record matching partial key...>
TEXT = TEXT + <next key> + chr$(13)
VROWS = VROWS + 1
NEXT <matching record>
SROW = 10 : EROW = (SROW+VROWS-1) MIN 23
! menu mode, border, save and restore window...
OPCODE = MMO'MNU + MMO'BDR + MMO'SVA + MMO'RSA
XCALL INMEMO,OPCODE,TEXT,0,SROW,SCOL,EROW,ECOL, &
LINK,XPOS,VSPEC,MMOCLR,EXTCTL
RETURN