A Quick glossary of functions/operators available for FMS WIN, FMS 4.x, 5.x, and FarmPro+
These expressions can be used with:
FarmPro+ in the expression builder (Filters, Sorts, Replace, Delete, Labels, Reports).
FMS 4.x with Global Replace, Mail Merge. Labels.
FMS 5.x with Global Replace, Mail Merge, Labels and Queries.
This is only meant as a quick reference and not a definitive explanation on possible uses.
For further information you may wish to check out books on the following subjects:
Clipper programming (Summer '87 and/or 5.x versions)
Microsoft FoxPro programming
dBase programming
Xbase programming
Books on these subjects are available at any bookstore with a well stocked computer section.
MATH functions/operators
|
|
|
|
|---|---|---|
| ^ | exponential | 6^2 returns 36 |
| * | multiplication | 6*6 returns 36 |
| / | division | 36/6 returns 36 |
| + | addition | 6+6 returns 12 |
| - | subtraction | 36-6 returns 30 |
| % | returns remainder of division | 38%6 returns 2 |
| ABS() | absolute value | ABS(-36) returns 36 |
| AT('c',"string") | returns first position of character 'c' in "string ", if not found returns 0. This function is case sensitive. | AT("t", "format this puppy!")
returns 6 |
| IF(expL,expr1,expr2) | Returns one of two values depending on the value of logical expression expL.expL - the logical expression to be evaluated
expr1 - the expression to returned if expL is true expr2 - the expression to returned if expL is false | IIF(.T., "It's True", "It was False")
returns "It's True" |
| INT(num) | convert to decimal num to integer | INT(1.3) = 1 |
| LEN(expr) | returns length of text string expr | LEN("dog") = 3 |
| MAX(num1,num2) | returns greater of values | |
| MIN(num2,num2) | returns lesser of 2 values | |
| MOD(num1,num2) | returns remainder of division | MOD(38,6) = 2 |
| SQRT(expr) | returns square root of expr | **FarmPro+ only! |
| VAL(expr) | converts string expr to numeric value | VAL("36") = 36 |
STRING functions/operators
| "text" | inserts a set of empty quotes in expression | **FarmPro+ only! |
| + | concatenates two text strings | "string1"+"string2"
returns "string1string2" |
| LEFT(expr,num) | returns num characters from left side of string expr | LEFT("hi there",2)
returns "hi" |
| LOWER(expr) | converts all characters in string expr to lower case | LOWER("Jones")
returns "jones" |
| LTRIM(expr) | removes all leading spaces from string | LTRIM(" Hi there! ")
returns "Hi there! " |
| RIGHT(expr,num) | returns num characters from right side of string expr | RIGHT("hi there",5)
returns "there" |
| SPACE(num) | return num number of spaces | |
| STR(expr,num) | converts numeric expression expr to string, num is the number of decimal place to convert. | STR(12.3456, 2)
returns "12.34" |
| SUBSTR(expr,num1,num2) | returns num2 number of characters from string expr starting at character number num1. If num2 and its comma are not used then all characters starting with character num1 are returned. | SUBSTR("I love food",3,4) returns "love"SUBSTR("I love food",8) returns "food" |
| TRIM(expr) | removes all trailing blank spaces | TRIM("Hi there! ")
returns "Hi there!" |
| UPPER(expr) | converts all characters in string expr to upper case | UPPER("Jones")
returns "JONES" |
LOGICAL functions/operators
| < | less than | |
| > | greater than | |
| = | equals When comparing strings - strings are compared character by character. If one string is shorter than the other, the comparison ends when the shorter string runs out of characters. | "Tom" = "Tomas"
would evaluate TRUE |
| == | exactly equalsWhen comparing strings - If one string is shorter than the other, the expression will evaluate FALSE. | "Tom" = "Tomas"
would evaluate FALSE |
| <> | NOT equals to | |
| <= | less than or equal to | |
| >= | greater than or equal to | |
| $ | containsUse to check to see is one string is contained within another. | "for"$"California"
would evaluate TRUE |
| .T. | TRUE | |
| .F. | FALSE | |
| .NOT. | NOT equals to | |
| .AND. | AND | |
| .OR. | OR |
DATE functions
| CDOW() | returns the day of the week from a given date expression | CDOW(CTOD("08/04/92"))
returns "Tuesday" CDOW(DATE()) returns current day of week |
| CMONTH() | returns the name of the month from a given date expression | CMONTH(CTOD("08/04/92"))
returns "August" CMONTH(DATE()) returns current month |
| CTOD() | converts character format to date format | CTOD("01/01/97") |
| DATE() | returns today's date in date format from computer | DATE()
returns today's date |
| DAY() | returns the numeric day of the month for a given date expression | DAY(CTOD("05/06/92"))
returns 6 DAY(DATE())returns today's day of month number |
| DOW() | returns the day of the week from a given date expression.
The value ranges from 1 (Sunday) to 7 (Saturday) | DOW(CTOD("08/04/92"))
returns 3 DOW(DATE()) returns today's day |
| DTOC() | returns date expression as a character format | DTOC(CTOD("08/04/92"))
returns "08/04/92" |
| MONTH() | returns the numeric month for a given date | MONTH(CTOD("08/04/92"))
returns 8 MONTH(DATE()) returns current month number |
| TIME() | returns the current system time in 24-hour, eighth-character string (HH:MM:SS) format | for example "14:22:35"
for 2:22pm at 35 seconds |
| YEAR() | returns the year (as a numeric value) from a given date expression | YEAR(CTOD("08/04/92"))
returns 1992 YEAR(DATE()) returns current year |
small office, home office, soho, soho software, real estate agent software, realtor software, mortgage broker software, real estate broker, real estate tax data software, tax roll data software, property data software, real estate property software, real estate database management software, real estate listing software, real estate software, real estate management, lending software, lender software, mortgage software, contact management, listing management, cma sofware, cma report software, closing management, escrow management, escrow software, closing software, closing manager, escrow manager, campaign manager, financial calculator, financial software, refinance software, refinancing software, loan qualification software, amortization software, scheduler software, scheduling software, real estate spreadsheet, settlement sheets, bulk mailing, client management, telemarketing software, real estate database software, mls software, multiple listing service software, scheduler, spreadsheet, settlement sheets, INSTANT IMPACT! GOLD, INSTANT IMPACT!, instant impact gold, Information Products, salesimpact, sales impact, the lenders edge, lenders edge, lender's edge, INSTANT IMPACT! GOLD, INSTANT IMPACT!, instant impact gold, Information Products, salesimpact, sales impact, the lenders edge, lenders edge, lender's edge