Feature Parameter Formulas


Feature Parameter Formulas

Formula

=

ConditionedExpression

ConditionedExpression

=

Expression1 ["?" Expression1 ":" Expression1 ]

If the section exists with a question mark, HiCAD checks whether the expression before the question mark is zero. If it is, the expression after the colon is taken; if it is not, that before the colon is taken.

Expression1

=

Expression2 { ("&" | "|") Expression2}

"&" is a logical And, "|" a logical Or.

Expression2

=

SimpleExpression [ ( "=" | "<" | ">" | "<=" | ">=" | "<>" ) SimpleExpression ]

The result of the comparison is 1 for true and 0 for false.

SimpleExpression

=

[ "+" | "-" | "!" ] Term { ("+" | "-") Term }

"!" is the logical Not. If the term after the "!" is zero, the result is 1, if not, 0

Term

=

Factor { ( "*" | "/" | "%") Factor }

"%" calculates the integral remainder in a division (modulo).

Factor

=

SimpleFactor ["^"SimpleFactor]

"^" is the potentiation.

SimpleFactor

=

Variable | Number | Constant | Function Call | "(" ConditionedExpression ")"

Bracketing can be used to nest formulas as required.

FunctionCall

=

Function "(" [ ConditionedExpression { "," ConditionedExpression } ] ")"

Parameter-free functions are called using empty brackets: f().

Constant

=

"pi"

Function

=

"sin" | "cos" | "tan" | ... | "aint" | ...

For the precise list of functions, see below.

Variable

=

Letter {LetterOrDigit | "_"}

Variable names must begin with a letter. The maximum length of a variable name determines the valid length of HiCAD macro variables.

Number

=

(Number1 | Number2) [("e" | "E") ["-" | "+"] Digits]

Examples: 1; 1.2; .2; 1e10; 1.23E5.

Number1

=

Digits ["." Digits]

Number2

=

"." Digits

LetterOrDigit

=

Letter | Digits

Letter

=

"a" | ... | "z" | "ä" | "ö" | "ü" | "A" | ... | "Z" | "Ä" | "Ö" | "Ü"

Digit

=

"0" | ... | "9"

Digits

=

Digit {Digit}

List

=

" (" SimpleExpression ( "; " | {"; " SimpleExpression}) ") "

The Value Input: Formulas and Variables

© Copyright 1994-2018, ISD Software und Systeme GmbH
Version 2302 - HiCAD Feature Technology
Date: 14/09/2018

> Feedback on this topic