Useful FoxPro commands
Visual FoxPro is a large and mature language with a wide choice of commands and
functions. Many were introduced in earlier versions of the language and the older
syntax has been carried all the way through from FoxBase to VFP.
This backwards compatibility means that the syntax can sometimes be inconsistent or old-fashioned
and it can sometimes be difficult to find just what
you want in the Help system when you are first learning the language. Here is a list
of some of the more useful commands and functions to get you started.
The distinction between commands and functions is that commands do something whereas
functions just return a value to be displayed or used in another command.
General commands
| CLEAR |
Clears the screen |
| CLEAR MEMORY |
Clears variables from memory |
| CLOSE DATA ALL |
Closes all tables and databases |
| QUIT |
Closes FoxPro |
Files and directories
| CD <dir> |
make <dir> the current directory. |
| CD ? |
display a directory tree and switch to the directory chosen. |
| GETDIR() |
display a directory tree and returns the directory name as a string. |
| GETFILE() |
displays a file-selection dialog and returns the file name as a string. |
Miscellaneous
| EMPTY(<name>) |
return .T. if field or variable <name> is empty. |
| GETCOLOR() |
display a colour picker and return the code for the colour chosen. |
| GETFONT() |
displays a dialog listing all the fonts available and returns the name
of the chosen font as a string.
|
| GETPICT() |
displays a file-selection dialog showing image files and returns the file name as a string. |
| ISNULL(<name>) |
return .T. if field or variable <name> is a null. |
| TYPE(<name>) |
return a code showing whether <name> is numeric, text, etc. |
|
FoxPro has always had functions like FREAD and FWRITE to read and
write binary files at a low level. They can handle files which
defeat the STRTOFILE and FILETOSTR functions.
Read More
|
Microsoft Access uses an American date format in SQL commands
Read More
|
FoxPro functions to manipulate names of files and folders
Read More
|
Visual Foxpro commands and functions for text
Read More
|
Visual FoxPro commands and functions to manipulate tables
Read More
|
|