Table of Contents
Kst equations are expressed in terms of built in operators, functions, constants, scalars and vectors in the current Kst session.
Some rules should be noticed when you enter equation expressions in either UI textbox or KstScript:
Vector names must be included in square brackets like this: [VectorName
].
Scalar names should also be included in square brackets: [ScalarName
]
Numbers don't need to be included in square brackets. PI and e should be counted as numbers, and all other built-in constants listed in table G.2 are scalars. i.e. you should include them in square brackets.
Values in scientific notation must be entered in the form: m
Ex
or m
ex
, where m
is the mantissa and x
is the exponent.
For example, one way to enter the value 15000 in scientific notation is 1.5E4
.
The following is a list of all built-in operators, functions and constants used to express Equations in Kst.
Logical operators are used to evaluate expressions to true(1) or false(0) value. In Kst, 0 is false, and all other numbers represent true value.
Bitwise And operator
It compares the corresponding bits of two operands in their binary representation of equal length. If both values of the pair are 1, the resulting bit value is 1, 0 otherwise.
Bitwise Or operators.
It compares the corresponding bits of two numbers in their binary representation of equal length. If both values of the pair are 0, the resulting bit is 0, 1 otherwise.
Logical operator And.
It takes two numbers as boolean variables, and results 1 (true) if both operands are non-zero, 0 (false) otherwise. See an example below.
Logical Or operators
It takes two operands and results 0 (false) if both operands are 0, 1 (true) otherwise. See an example below
Logical not
Less than
Less than and equal to
Equal to
Greater than
Greater than and equal to
Not equal to
Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team