@…PROMPT

@…PROMPT

Display a menu item on screen and define a message

Syntax

      @ <nRow>, <nCol> PROMPT <cPrompt> [MESSAGE <xMsg>]

Arguments

<nRow> is the row number to display the menu <cPrompt>. Value could range from zero to MaxRow().

<nCol> is the column number to display the menu <cPrompt>. Value could range from zero to MaxCol().

<cPrompt> is the menu item character string to display.

<xMsg> define a message to display each time this menu item is highlighted. <xMsg> could be a character string or code block that is evaluated to a character string. If <xMsg> is not specified or of the wrong type, an empty string (“”) would be used.

Description

With @…Prompt you define and display a menu item, each call to @…Prompt add another item to the menu, to start the menu itself you should call the __MenuTo() function (MENU TO command). You can define any row and column combination and they will be displayed at the order of definition. After each call to @…Prompt, the cursor is placed one column to the right of the last text displayed, and ROW() and COL() are updated.

@…PROMPT command is preprocessed into __AtPrompt() function during compile time.

Examples

      // display a two line menu with status line at the bottom
      // let the user select favorite day
      SET MESSAGE TO 24 CENTER
      @ 10, 2 PROMPT "Sunday" MESSAGE "This is the 1st item"
      @ 11, 2 PROMPT "Monday" MESSAGE "Now we're on the 2nd item"
      MENU TO nChoice
      DO CASE
      CASE nChoice == 0           // user press Esc key
         QUIT
      CASE nChoice == 1           // user select 1st menu item
         ? "Guess you don't like Mondays"
      CASE nChoice == 2           // user select 2nd menu item
         ? "Just another day for some"
      ENDCASE

Compliance

Clipper (menu)

Seealso

ACHOICE(), MENU TO, SET MESSAGE, SET INTENSITY, SET WRAP, __MENUTO()

3 responses to “@…PROMPT

  1. Pingback: Harbour All Commands | Viva Clipper !

  2. Pingback: Harbour Commands | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.