Class TMathFunction

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TMathFunction = class(TMathExpr)

Description

InfixOperatorName: name of this function for use in expressions like "arg_1 InfixOperatorName arg_2 ... arg_n". Empty string ('') if no such name for this function. But note that at least one of FunctionName and InfixOperatorName must not be empty !

The only exception is the fkNegate function, that is neither infix operator nor a usual function that must be specified as "function_name(arguments)". fkNegate is an exception, and I there will be a need, I shall fix this (probably by introducing some third field, like PrefixOperatorName ?)

Note 2 things:

  1. Function that can be used as infix operator (i.e. has InfixOperatorName <> '') is not necessary binary operator, i.e. InfixOperatorName <> '' does not determine the value of ArgsCount. This way I was able to define infix operators +, -, * etc. that take any number of arguments and operators like ˆ and > that always take 2 arguments.

  2. Function may have both FunctionName <> '' and InfixOperatorName <> ''. E.g. fkPower can be used as "Power(3, 1.5)" or "3 ˆ 1.5".

Hierarchy

Overview

Methods

Public constructor Create(AFuncKind: TFunctionKind; AArgs: TMathExprList); overload;
Public constructor Create(AFuncKind: TFunctionKind; const AArgs: array of TMathExpr); overload;
Public destructor Destroy; override;
Public function ArgsCount: integer;
Public function Value(varfunc: TVariableValueFunc): Float; override;
Public function ToString: string; override;

Properties

Public property FuncKind: TFunctionKind read FFuncKind;
Public property Args: TMathExprList read FArgs;

Description

Methods

Public constructor Create(AFuncKind: TFunctionKind; AArgs: TMathExprList); overload;

AArgs contents are COPIED from AArgs, i.e. AArgs object is not referenced by this object. But items on AArags are not copied recursively, we copy references from AArags items.

Public constructor Create(AFuncKind: TFunctionKind; const AArgs: array of TMathExpr); overload;
 
Public destructor Destroy; override;
 
Public function ArgsCount: integer;
 
Public function Value(varfunc: TVariableValueFunc): Float; override;
 
Public function ToString: string; override;
 

Properties

Public property FuncKind: TFunctionKind read FFuncKind;
 
Public property Args: TMathExprList read FArgs;

contents of Args are read-only !


Generated by PasDoc 0.10.0 on 2008-02-25 00:00:36