![]() |
![]() | ||||
![]() | UFO: Predefined | ![]() | ![]() | UFO: Examples |
UFO: Syntax of Functions
The syntax for formulas is presented in Backus-Naur form.
<Expression> := <CompExpr> [ ? <Expression> : <Expression> ] <CompExpr> := <SimpleExpr> [ <RelOp> <SimpleExpr> ] <SimpleExpr> := <Term> { <AddOp> <Term> } <Term> := <Sign> { <MulOp> <Sign> } <Sign> := [-] <Factor> <Factor> := <Faculty> { <PowOp> <Faculty> } <Faculty> := <Exponent>[!] <Exponent> := ( <Expression> ) | <Constant> | <FunctionCall> | <Variable>
<RelOp> := < | > | <= | >= | = <AddOp> := + | - <MulOp> := * | / <PowOp> := ^ | **
<Variable> := <Identifier> <FunctionCall> := <Identifier> (<ArgumentList>) <ArgumentList> := <Expression> { , <Expression> } <Identifier> := <Letter> { <Letter> | <Digit> }
<Constant> := [ + | -] <FloatNumber> [ <Exp> [ + | - ] <Number>] <FloatNumber> := <Number> [. [<Number>] ] | [ . ] <Number> <Number> := <Digit> { <Digit> } <Exp> := e | E
<Letter> := A | B | C | ... | Z | a | b | c | ... | z <Digit> := 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
The syntax for definitions of functions and variables in
the Calculator is given below.
<VarDef> := <Identifier> [:] = <Expression> <FuncDef> := <Identifier> (<ParamList>) [:]= <Expression> <ParamList> := <Identifier> {, <Identifier>}
![]() |