reference to foxpro functions

23
REFERENCE TO FOXPRO FUNCTIONS Complied By: Chandrakant Bhosale 1

Upload: ganapatibo-ganapati

Post on 07-Sep-2015

15 views

Category:

Documents


1 download

DESCRIPTION

foxpro

TRANSCRIPT

REFERENCE TO FOXPRO FUNCTIONS

REFERENCE TO FOXPRO FUNCTIONS

Complied By:

Chandrakant Bhosale

#DEFINE...#UNDEF Preprocessor Directive

Creates and releases compile-time constants.

Syntax#DEFINE ConstantName eExpression...

#UNDEF ConstantNameArgumentsConstantNameSpecifies a compile-time constant name. The constant name must be a legitimate Microsoft Visual FoxPro name that begins with a letter or an underscore and consists of up to 254 letters, digits, or underscores. To improve program readability and simplify debugging, capitalize your constant names and use a standard naming convention for them.

ImportantDo not use Visual FoxPro keywords for constant names.

To stop text substitution for a constant created with #DEFINE, issue #UNDEF ConstantName.

eExpressionSpecifies the value of the compile-time constant. eExpression can be a name or an expression that evaluates to a character, numeric, currency, date, datetime, or logical value.

ImportantDo not use system variables for eExpression. System variables are not evaluated until run time.

RemarksThe #DEFINE and #UNDEF preprocessor directives are used to create compile-time constants in programs. By creating constants with #DEFINE instead of using variables, you can reduce memory consumption, increase performance, and simplify programs.

To create a constant with #DEFINE, specify the constant's name with ConstantName and its value with eExpression. When the program is compiled, text substitution is performed and the constant value expression is substituted for the constant name wherever it appears in the program. You can stop the substitution for the constant by issuing #UNDEF.

Substitution occurs only in program lines that follow the #DEFINE statement that creates the constant and that precede the #UNDEF statement for that constant. The constant is available only to the program that creates the constant.

If #DEFINE is placed within an event or method procedure in a form, the #DEFINE compile-time constant is available only within the event or method procedure. To make #DEFINE compile-time constants available to all event and method procedures in a form, choose the Include File menu item from the Form menu and specify a header file containing the #DEFINE compile-time constants.

Note that compile time constants are not recognized when placed within quotation marks.

#IF...#ENDIF Preprocessor Directive

Conditionally includes source code at compile-time.

Syntax#IF nExpression1 | lExpression1 Commands[#ELIF nExpression2 | #ELIF lExpression2 Commands... #ELIF nExpressionN | #ELIF lExpressionN Commands][#ELSE Commands]#ENDIF

Arguments#IF nExpression1 | lExpression1CommandsnExpression1 specifies the numeric expression that is evaluated.

If the expression is nonzero, the commands immediately following #IF are included in the compiled code. The #IF...#ENDIF structure is exited, and the first program line following #ENDIF is then compiled.

If the expression is 0, the commands immediately following #IF are not included in the compiled code. Any following #ELIF directives are evaluated.

lExpression1 specifies the logical expression that is evaluated.

If the expression is true (.T.), the commands immediately following #IF are included in the compiled code. The #IF...#ENDIF structure is exited, and the first program line following #ENDIF is then compiled.

If the expression is false (.F.), the commands immediately following #IF are not included in the compiled code. Any following #ELIF directives are evaluated.

NoteDo not specify system variables for nExpression1 or lExpression1. System variables are not evaluated until run time.

#ELIF nExpression2 | #ELIF lExpression2Commands

...

#ELIF nExpressionN | #ELIF lExpressionNCommandsIf nExpression1 is 0 or lExpression1 is false (.F.), the #ELIF directives are evaluated. The first #ELIF expression nExpression2 or lExpression2, if present, is evaluated. If nExpression2 is nonzero or lExpression2 is true (.T.), the commands following #ELIF are included in the compiled code. The #IF...#ENDIF structure is exited, and the first program line following #ENDIF is then compiled.

If nExpression2 is 0 or lExpression2 is false (.F.), the commands following #ELIF are not included in the compiled code. The next #ELIF directive is evaluated.

#ELSE CommandsIf no #ELIF directives are included, or if those that are included evaluate to 0 or false (.F.), the presence or absence of #ELSE determines whether any additional commands are included in the compiled code:

If #ELSE is included, the commands following #ELSE are included in the compiled code.

If #ELSE is not included, none of the commands between #IF and #ENDIF are included in the compiled code. The #IF...#ENDIF structure is exited, and compilation continues on the first program line following #ENDIF.

#ENDIF

Indicates the end of the #IF statement.

Remarks#IF...#ENDIF can improve the readability of source code, reduce compiled program size, and, in some cases, improve performance.

When the #IF...#ENDIF structure is compiled, successive logical or numeric expressions within the structure are evaluated. The evaluation results determine which set of Visual FoxPro commands (if any) are included in the compiled code.

#IFDEF|#IFNDEF...#ENDIF Preprocessor Directive

Conditionally includes a set of commands at compile time if a compile-time constant is defined.

Syntax#IFDEF | #IFNDEF ConstantName Commands[#ELSE Commands]#ENDIF

Arguments#IFDEF

Specifies that a set of commands is included at compile time when the ConstantName is defined.

The following describe how a set of commands is included at compile time when you include #IFDEF:

If ConstantName is defined, the set of commands following #IFDEF and preceding #ELSE or #ENDIF (whichever occurs first) is included at compile time.

If ConstantName is not defined and #ELSE is included, the set of commands following #ELSE and preceding #ENDIF is included at compile time.

If ConstantName is not defined and #ELSE is not included, no commands within the #IFDEF ... #ENDIF structure are included at compile time.

#IFNDEF

Specifies that a set of commands is included at compile time when the ConstantName is not defined.

The following describe how a set of commands is included at compile time when you include #IFNDEF:

If ConstantName is not defined, the set of commands following #IFNDEF and preceding #ELSE or #ENDIF (whichever occurs first) is included at compile time.

If ConstantName is defined and #ELSE is included, the set of commands following #ELSE and preceding #ENDIF is included at compile time.

If ConstantName is defined and #ELSE is not included, no commands within the #IFNDEF ... #ENDIF structure are included at compile time.

ConstantNameSpecifies the compile-time constant whose existence determines whether a set of commands is included at compile time. Compile-time constants are defined with #DEFINE.

CommandsSpecifies the set of commands that is included at compile time.

RemarksYou can nest an #IFDEF | #IFNDEF...#ENDIF structure within another #IFDEF | #IFNDEF...#ENDIF structure.

Comments can be placed on the same line after #IFDEF, #IFNDEF, #ELSE, and #ENDIF. These comments are ignored during compilation and program execution.

#INCLUDE Preprocessor Directive

Tells the Visual FoxPro preprocessor to treat the contents of a specified header file as if it appeared in a Visual FoxPro program.

Syntax#INCLUDE FileNameArgumentsFileNameSpecifies the name of the header file that is merged into the program during compilation.

You can include a path with the header file name. When you include a path with the header file name, Visual FoxPro searches for the header file only in the specified location.

If you do not include a path with the header file name, Visual FoxPro searches for the header file in the default Visual FoxPro directory, and then along the Visual FoxPro path. The Visual FoxPro path is specified with SET PATH.

RemarksYou can create header files containing preprocessor directives and then use #INCLUDE to merge the contents of the header file into a program when the program is compiled. The contents of the header file are inserted into the program during compilation at the point where #INCLUDE appears in the program.

Only the #DEFINE...#UNDEF and #IF...#ENDIF preprocessor directives are recognized in a header file. Comments and Visual FoxPro commands included in a header file are ignored.

A program can contain any number of #INCLUDE directives. These directives can appear anywhere within the program. #INCLUDE directives can also appear in header files, allowing you to nest #INCLUDE directives.

Header files typically have an .h extension, although they can have any extension. A Visual FoxPro header file, Foxpro.h, is included. It contains many of the constants described throughout this documentation.

:: Scope Resolution Operator

Runs a parent class method from within a subclass method.

SyntaxcClassName::cMethodRemarksThe :: operator is used to execute a parent class method from within a subclass method. When you create a subclass, the subclass methods are automatically inherited from the parent class. The :: operator lets you execute the parent class method in the subclass method and then perform additional processing for the subclass method. The subclass definitions in the demonstrate how the :: operator is used to execute the parent class method within a subclass method.

For additional information about the :: scope resolution operator, see Chapter 3, Object-Oriented Programming in the Programmer's Guide.

$ Operator

Returns true (.T.) if a character expression is contained in another character expression; otherwise, returns false (.F.).

SyntaxcSearchFor $ cSearchInReturnsLogical

ArgumentscSearchForSpecifies the expression looked for within cSearchIn.

cSearchInSpecifies the expression that is searched to see if it contains cSearchFor.

If cSearchFor is found in cSearchIn, $ returns true (.T.); otherwise, it returns false (.F.). cSearchFor and cSearchIn can be character-type variables or array elements, character-type fields, character string literals, or memo fields of any length.

Memo fields can be manipulated like character expressions, fields in tables, variables, or array elements. For example, if MEMO_FLD is a memo field, the following is acceptable:

LIST FOR 'FOX' $ UPPER(memo_fld)

RemarksIf the character expression isn't found, false (.F.) is returned. The $ operator is case-sensitive and is not Rushmore optimizable.

% Operator

Returns the remainder (modulus) obtained by dividing one numeric expression into another.

SyntaxnDividend % nDivisorArgumentsnDividendSpecifies the dividend (numeric expression being divided). The number of decimal places in nDividend determines the number of decimal places in the result.

nDivisorSpecifies the divisor (the numeric expression dividing the dividend nDividend). A positive number is returned if nDivisor is positive; a negative number if nDivisor is negative. nDivisor cannot be zero.

RemarksThe modulus operator (%) and MOD() return identical results.

The modulus operator (%) is an arithmetic operator. Other arithmetic operators are: + (addition), - (subtraction), * (multiplication), / (division), and ^ (exponentiation). When these operators are combined in a numeric expression, % has the same precedence as * and /.

For a further discussion of operators and their order of precedence, see the Operators topic.

& Command

Performs macro substitution.

Syntax& VarName[.cExpression]

Arguments& VarNameSpecifies the name of the variable or array element to reference in the macro substitution. Do not include the M. prefix that distinguishes variables from fields. Such inclusion causes a syntax error. The macro should not exceed the maximum statement length permitted in Visual FoxPro.

A variable cannot reference itself recursively in macro substitution. For example, the following generates an error message:

STORE '&gcX' TO gcX

? &gcX

Macro substitution statements that appear in DO WHILE, FOR, and SCAN are evaluated only at the start of the loop and are not reevaluated on subsequent iterations. Any changes to the variable or array element that occur within the loop are not recognized.

.cExpressionThe optional period (.) delimiter and .cExpression are used to append additional characters to a macro. cExpression appended to the macro with .cExpression can also be a macro. If cExpression is a property name, include an extra period (cExpression..PropertyName).

RemarksMacro substitution treats the contents of a variable or array element as a character string literal. When an ampersand (&) precedes a character-type variable or array element, the contents of the variable or element replace the macro reference. You can use macro substitution in any command or function that accepts a character string literal.

TipWhenever possible, use a name expression instead of macro substitution. A name expression operates like macro substitution. However, a name expression is limited to passing character strings as names. Use a name expression for significantly faster processing if a command or function accepts a name (a file name, window name, menu name, and so on).

For additional information on name expressions, see Overview of the Language.

While the following commands are acceptable:

STORE 'customer' TO gcTableName

STORE 'company' TO gcTagName

USE &gcTableName ORDER &gcTagName

use a name expression instead:

USE (gcTableName) ORDER (gcTagName)

Macro substitution is useful for substituting a keyword in a command. In the following , the TALK setting is saved to a variable so the setting can be restored later in the program. The original TALK setting is restored with macro substitution.

&& Command

Indicates the beginning of a nonexecuting inline comment in a program file.

Syntax&& [Comments]

ArgumentsCommentsIndicates that inline comments follow. For example:

STORE (20*12) TO gnPayments && 20 years of monthly payments

Inserting inline comments to denote the end of the IF...ENDIF, DO, and FOR...ENDFOR structured programming commands greatly improves the readability of programs.

RemarksPlace a semicolon (;) at the end of each comment line that continues to a following line. You cannot place && and a comment after the semicolon used to continue a command line to an additional line.

* Command

Indicates the beginning of a nonexecuting comment line in a program file.

Syntax* [Comments]

ArgumentsCommentsSpecifies the comment in the comment line. For example:

*This is a comment

RemarksPlace a semicolon (;) at the end of each comment line that continues to a following line.

= Command

Evaluates one or more expressions.

Syntax= Expression1 [, Expression2 ...]

ArgumentsExpression1 [, Expression2 ...]

Specifies the expression or expressions that the = command evaluates.

RemarksThe = command evaluates one or more expressions, Expression1, Expression2 ..., and discards the return values. This option is particularly useful when a Visual FoxPro function or a user-defined function has a desired effect, but there is no need to assign the function's return value to a variable, array element, or field.

For , to turn insert mode on, you can issue the following command:

= INSMODE(.T.)

INSMODE normally returns a true (.T.) or false (.F.) value. In the above, the function is executed but the return value is discarded.

If only one expression (Expression1) is included, the equal sign is optional.

NoteThere are two unrelated uses for the equal sign (=). It can be used as an operator in logical expressions to make a comparison, or to assign values to variables and array elements. In these two cases, the equal sign (=) is an operator and not a command. See Relational Operators for more information about using the equal sign (=) as an operator in logical expressions. See STORE for more information about using the equal sign (=) to assign values to variables and array elements.

\ | \\ Command

Prints or displays lines of text.

Syntax\TextLine-or-

\\TextLineArguments\TextLineWhen you use \, the text line is preceded by a carriage return and a line feed.

\\TextLineWhen you use \\, the text line is not preceded by a carriage return and a line feed.

Any spaces preceding \ and \\ are not included in the output line, but spaces following \ and \\ are included.

You can embed an expression in the text line. If the expression is enclosed in the text merge delimiters (> by default) and SET TEXTMERGE is ON, the expression is evaluated and its value is output as text.

RemarksThe \ and \\ commands facilitate text merge in Visual FoxPro. Text merge lets you output text to a file to create form letters or programs.

Use \ and \\ to output a text line to the current text-merge output file and the screen. SET TEXTMERGE is used to specify the text merge output file. If text merge isn't directed to a file, the text line is output only to the main Visual FoxPro window or the active user-defined output window. SET TEXTMERGE NOSHOW suppresses output to the main Visual FoxPro window or the active user-defined window.

? | ?? Command

Evaluates expressions and displays the results.

Syntax? | ?? Expression1 [PICTURE cFormatCodes] | [FUNCTION cFormatCodes] | [VnWidth] [AT nColumn] [FONT cFontName [, nFontSize] [STYLE cFontStyle | Expression2]] [, Expression3] ...

Arguments? Expression1Evaluates the expression specified by Expression1 and sends a carriage return and line feed before the expression results. The results are displayed on the next line of the main Visual FoxPro window or the active user-defined window and printed at the left margin of a page, unless a function code cFormatCodes or the _ALIGNMENT system variable specifies otherwise.

If you omit the expressions, a blank line is displayed or printed. A space is placed between expression results when multiple expressions are included.

?? Expression1Evaluates the expression specified by Expression1 and displays the expression results on the current line at the current position of the main Visual FoxPro window, an active user-defined window, or the printer. A carriage return and line feed are not sent before the results.

PICTURE cFormatCodesSpecifies a picture format in which the result of Expression1 is displayed. cFormatCodes can consist of function codes, picture codes, or a combination of both. You can use the same codes available in the Format and InputMask properties.

Function codes affect the overall format of the result; picture codes act on individual characters in the result. If function codes are used in cFormatCodes, they must appear before the picture codes and they must be preceded by @. Multiple function codes with no embedded spaces can immediately follow @. The last function code must be followed by one or more spaces. The space or spaces signal the end of the function codes and the start of the picture codes.

FUNCTION cFormatCodesSpecifies a function code to include in ? and ?? output. If the function clause is included, do not precede the function codes with @. Function codes must be preceded by @ when included in PICTURE.

VnWidthSpecifies a special function code that enables the results of a character expression to stretch vertically within a limited number of columns. nWidth specifies the number of columns in the output.

? 'This is an example of how the V function code works.' ;

FUNCTION 'V10'

AT nColumnSpecifies the column number where the output is displayed. This option lets you align output in columns to create a table. The numeric expression nColumn can be a user-defined function that returns a numeric value.

FONT cFontName [, nFontSize]

Specifies a font for ? | ?? output. cFontName specifies the name of the font, and nFontSize specifies the point size. For example, the following command displays the system date in 16-point Courier font:

? DATE() FONT 'Courier',16

If you include the FONT clause but omit the point size nFontSize, a 10-point font is used.

If you omit the FONT clause and ? | ?? output is placed in the main Visual FoxPro window, the main Visual FoxPro window font is used for the output. If you omit the FONT clause and ? | ?? output is placed in a user-defined window, the user-defined window font is used for the output.

If the font you specify is not available, a font with similar font characteristics is substituted.

STYLE cFontStyleSpecifies a font style for ? | ?? output. If you omit the STYLE clause, the Normal font style is used. If the font style you specify is not available, a font style with similar characteristics is substituted.

NoteYou must include the FONT clause when you specify a font style with the STYLE clause.

The font styles you can specify with cFontStyle are as follows:

CharacterFont style

BBold

IItalic

NNormal

OOutline

QOpaque

SShadow

-Strikeout

TTransparent

UUnderline

You can include more than one character to specify a combination of font styles. For example, the following command displays the system date in Courier Bold Italic:

? DATE() FONT 'COURIER' STYLE 'BI'

Remarks? and ?? evaluate expressions and send the results to the main Visual FoxPro window, an active user-defined window, or the printer.

If SET PRINTER is ON, the expression results are directed to the printer and the main Visual FoxPro window or an active user-defined window. If SET PRINTER is ON and SET CONSOLE is OFF, the results are directed only to the printer.

??? Command

Sends output directly to the printer.

Syntax??? cExpressionArgumentscExpressionSpecifies the characters that are sent to the printer.

RemarksA group of three question marks bypasses the printer driver and sends the contents of cExpression directly to the printer. cExpression must contain valid printer codes.

Printer control codes allow you to reset the printer, change type styles and sizes, and enable or disable boldface printing. These codes can consist of any combination of printable or nonprintable characters that are specific to the printer you're using. You can direct control codes to the printer in several different ways:

Use combinations of CHR() and quoted strings concatenated with + to send ASCII characters directly to the printer.

Use quotation marks to send a string containing printer codes or ASCII characters.

Codes can be sent to the printer before printing begins and after printing ends with the _PSCODE and _PECODE system variables. For more information, see _PSCODE and _PECODE.

Printer control codes vary from printer to printer. The best source for information about printer control codes is the manual that came with your printer.

@...BOX Command

Included for backward compatibility. Use the Shape control instead.

@ ... CLASS Command

Creates a control or object that can be activated with READ.

Syntax@ nRow, nColumn CLASS ClassName NAME ObjectNameArguments@ nRow, nColumnSpecifies the position of the control or object. The height and width of the control or object is determined by the class default height and width values.

Rows are numbered from top to bottom. The first row is number 0 in the main Visual FoxPro window or in a user-defined window. Row 0 is the row immediately beneath the Visual FoxPro system menu bar.

Columns are numbered from left to right. The first column is number 0 in the main Microsoft Visual FoxPro window or in a user-defined window. When a control or object is placed in a user-defined window, the row and column coordinates are relative to the user-defined window, not to the main Visual FoxPro window.

A position in the main Visual FoxPro window or in a user-defined window is determined by the font of the window. Most fonts can be displayed in a wide variety of sizes; some are proportionally spaced. A row corresponds to the height of the current font; a column corresponds to the average width of a letter in the current font.

You can position the control or object using decimal fractions for row and column coordinates.

CLASS ClassNameSpecifies the class of the control or object. ClassName can be a Visual FoxPro base class or a user-defined class. The following table lists the Visual FoxPro base classes you can specify for ClassName.

Base class names

CheckBoxLine

ColumnListBox

ComboBoxOLEControl

CommandButtonOLEBoundControl

CommandGroupOptionButton

ContainerOptionGroup

ControlPage

CursorPageFrame

CustomRelation

DataEnvironmentSeparator

EditBoxShape

GridSpinner

HeaderTextBox

ImageTimer

Label

NAME ObjectNameSpecifies the name of the object reference variable to create. The object-oriented properties, events, and methods of the control or object can be manipulated by referencing this variable.

Remarks@ ... CLASS provides an intermediate step for converting programs and applications created in earlier versions of FoxPro to the preferred object-oriented programming methods of Visual FoxPro. For additional information about backward compatibility with FoxPro 2.x controls, see Controls and Objects.

For information about object-oriented programming in Visual FoxPro, see Chapter 3, "Object-Oriented Programming," in the Programmer's Guide.

For information about object-oriented programming in Visual FoxPro, see Chapter 3, Object-Oriented Programming, in the Programmer's Guide.

@...CLEAR Command

Clears a portion of the main Visual FoxPro window or a user-defined window.

Syntax@ nRow1, nColumn1 [CLEAR | CLEAR TO nRow2, nColumn2]

Arguments@ nRow1, nColumn1 CLEAR

Clears a rectangular area whose upper-left corner begins at nRow1 and nColumn1 and continues to the lower-right corner of the main Visual FoxPro window or a user-defined window.

CLEAR TO nRow2, nColumn2Clears a rectangular area whose upper-left corner is at nRow1 and nColumn1 and whose lower-right corner is at nRow2 and nColumn2.

RemarksIf you omit CLEAR or CLEAR TO, Visual FoxPro clears nRow1 from nColumn1 to the end of the row.

@...EDIT - Edit Boxes Command

Included for backward compatibility. Use the EditBox control instead.

@...FILL Command

Changes the colors of existing text within an area of the screen.

Syntax@ nRow1, nColumn1 FILL TO nRow2, nColumn2[COLOR SCHEME nSchemeNumber | COLOR ColorPairList]

Arguments@ nRow1, nColumn1Specifies the upper-left corner of the area to change.

FILL TO nRow2, nColumn2Specifies the lower-right corner of the area to change.

COLOR SCHEME nSchemeNumberSpecifies the color of the area. Only the first color pair in the specified color scheme determines the color of the area.

COLOR ColorPairListSpecifies the color of the area. Only the first color pair in the specified color pair list determines the color of the area.

If you omit the COLOR SCHEME or COLOR clauses, the rectangular portion is cleared. An area can also be cleared with @...CLEAR.

For information about color schemes and color pairs, see the Colors Overview online topic.

RemarksThis command changes the colors of text within a rectangular area of the main Visual FoxPro window or the active user-defined window. You can set the foreground and background color attributes for existing text only. Any text output to the same area after you issue @...FILL appears in the default screen or window colors.

@...GET - Check Boxes Command

Included for backward compatibility. Use the CheckBox control instead.

@...GET - Combo Boxes Command

Included for backward compatibility. Use the ComboBox control instead.

@...GET - Command Buttons Command

Included for backward compatibility. Use the CommandButton control instead.

@...GET - List Boxes Command

Included for backward compatibility. Use the ListBox control instead.

@...GET - Option Buttons Command

Included for backward compatibility. Use the OptionGroup control instead.

@...GET - Spinners Command

Included for backward compatibility. Use the Spinner control instead.

@...GET - Text Boxes Command

Included for backward compatibility. Use the TextBox control instead.

@...GET - Transparent Buttons Command

Included for backward compatibility. Use the CommandButton control instead.

@...MENU Command

Included for backward compatibility. Use the Menu Designer and CREATE MENU instead.

@...PROMPT Command

Included for backward compatibility. Use the Menu Designer and CREATE MENU instead.

@...SAY Command

Included for backward compatibility. Use the Label control to display text and the TextBox control to display the contents of fields and variables.

@...SAY - Pictures & OLE Objects Command

Included for backward compatibility. Use the Image, OLE Bound, and OLE Container controls instead.

@...SCROLL Command

Moves an area of the main Microsoft Visual FoxPro window or a user-defined window up, down, left, or right.

Syntax@ nRow1, nColumn1 TO nRow2, nColumn2 SCROLL [UP | DOWN | LEFT | RIGHT] [BY nMoveAmount]

Arguments@ nRow1, nColumn1 TO nRow2, nColumn2 SCROLL

Moves a rectangular area whose upper-left corner is at nRow1, nColumn1 and lower-right corner is at nRow2, nColumn2.

UP | DOWN | LEFT | RIGHT

Specifies the direction in which rectangular area is moved. If you omit a direction clause, the area is moved upward.

BY nMoveAmountSpecifies the number of rows or columns the rectangular area is moved. If you omit BY nMoveAmount, the region is moved by one row or column.

@...TO Command

Included for backward compatibility. Use the Shape control instead.

ABS() Function

Returns the absolute value of the specified numeric expression.

SyntaxABS(nExpression)

ReturnsNumeric

ArgumentsnExpressionSpecifies the numeric expression whose absolute value ABS() returns.

ACCEPT Command

Included for backward compatibility. Use the TextBox control instead.

@...SCROLL Command

Moves an area of the main Microsoft Visual FoxPro window or a user-defined window up, down, left, or right.

Syntax@ nRow1, nColumn1 TO nRow2, nColumn2 SCROLL [UP | DOWN | LEFT | RIGHT] [BY nMoveAmount]

Arguments@ nRow1, nColumn1 TO nRow2, nColumn2 SCROLL

Moves a rectangular area whose upper-left corner is at nRow1, nColumn1 and lower-right corner is at nRow2, nColumn2.

UP | DOWN | LEFT | RIGHT

Specifies the direction in which rectangular area is moved. If you omit a direction clause, the area is moved upward.

BY nMoveAmountSpecifies the number of rows or columns the rectangular area is moved. If you omit BY nMoveAmount, the region is moved by one row or column.

@...TO Command

Included for backward compatibility. Use the Shape control instead.

ABS() Function

Returns the absolute value of the specified numeric expression.

SyntaxABS(nExpression)

ReturnsNumeric

ArgumentsnExpressionSpecifies the numeric expression whose absolute value ABS() returns.

ACCEPT Command

Included for backward compatibility. Use the TextBox control instead.

18