Example of @ ... GET FUNCTION M

Last reviewed: June 27, 1995
Article ID: Q99913
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a

SUMMARY

There is no example of the M function code of the @ ... GET command in the FoxPro documentation. The example below illustrates its syntax and usage.

MORE INFORMATION

Method 1

The following code displays a GET field in which pressing the SPACEBAR cycles through the names in the comma-separated list. Pressing the RETURN key stores the currently displayed name to the variable MARX.

   PRIVATE marx
   @2,2 GET marx ;
      FUNCTION 'M Groucho,Chico,Harpo,Zeppo' ;
      SIZE 1,7 ;
      DEFAULT SPACE(7)
   READ

NOTE: The space between "M" and the beginning of the list is critical. If there is no space, the GET field displays garbage.

Method 2

In the Format box for a screen GET object, type the following:

   @M Choice1,Choice2,Choice3[,...]

FUNCTION codes can be included in a PICURE clause (which is what the Format option generates). In this case, the PICTURE clause must start with "@".

NOTE: If the GET object is a memory variable, its assigned value length will determine how many characters of the list items will be displayed. If no value is assigned to the memory variable, then the DEFAULT value of " " (a blank space of one character length) is used and will then only display the first character of the items in the list.

REFERENCES

"Commands & Functions," version 2.0, see "@ ... SAY/GET FUNCTION Code" "Language Reference," version 2.5, page L3-33


Additional reference words: FoxDos FoxWin 2.50 2.00 2.50a docerr
KBCategory: kbprg kbdocerr
KBSubcategory: FxprgGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.