| Expression | string | |
| The expression to be evaluated. | ||
| Value | extended | |
| The resultant value of the expression. | ||
| IsBuiltIn | (FuncName: string): boolean | |
| Determines whether the argument is a recognised built-in function. | ||
| NamedValues | TNamedValues | |
| A structure for holding named values, often constants such as pi and e, but it can hold any values that you want. | ||
| OnGetValue | TGetValueEvent | |
| An event called to retrieve the value of a user-defined variable. For example, if the expression was 2 * A then this event would be called to retrieve the value of A (unless A was pre-defined in the list of NamedValues. | ||
| OnChange | TNotifyEvent | |
| Invoked when the expression is changed. | ||
TNamedValues
This type allows the definitions of constants and frequently used variables.
| Add | (name: string; value: extended) | |
| Adds a named value. Will first delete any existing value with the same name. | ||
| Delete | (name: string) | |
| Deletes a named value. Performs no action if the name is not present. | ||
| Clear | () | |
| Deletes all named values. | ||
| IndexOf | (name: string): integer | |
| Returns the index of a value from its name. Returns -1 if the value is not present. | ||
| Assign | (Source: TPersistent) | |
| Copies a second TNamedValues to the current one. | ||
| BeginUpdate | () | |
| Starts buffering changes. The OnChange event will not be called until EndUpdate has been called for each time BeginUpdate was called. | ||
| EndUpdate | () | |
| Finishes buffering changes. EndUpdate should be called once for each BeginUpdate. | ||
| IsValidName | (name: string): boolean | |
| Determines whether name is valid. Only alphanumeric and underscore characters are allowed in value names. | ||
| ValueByName | [name: string]: extended | |
| A value from its name. | ||
| ValueByIndex | [index: integer]: extended | |
| A value from its index. | ||
| Values | [index: integer]: TNamedValue | |
| The array of named values. | ||
| Count | integer | |
| The number of named values defined. | ||
| OnChange | TNotifyEvent | |
| Invoked when the value is changed. | ||
| CaseSensitive | boolean | |
| Whether named values should be case-sensitive or not, e.g. whether variables PI and pi should be considered different or the same. | ||
Types
| TGetValueEvent | procedure(Sender: TObject; Identifier: string; var Value: extended; var Undefined: boolean) of object |
| EExpressionError | An exception raised if the expression contains an error. |
Copyright © 2000-2008 Simon Armstrong. All Rights Reserved.
Last Update
2008-08-07

