Expressions and functions

Arithmetic operations

In expressions standard arithmetic operators +, -, /, *, %, can be used.

Comparisons

Comparison operators: <, <=, >, >=, give 1 or 0 depending on values of the arguments.

Functions

In expressions following functiona can be used: int, min, max, avg, sum. Functions: min, max, avg, sum, can have arbitrary number of arguments. In this functions as well as in arithmetic operations empty fileds are treated as 0.

There are also functions: Min, Max, Avg, Cnt, which ignore empty fileds. Functions: Min, Max, Avg, Cnt, can have arbitrary number of argumnts. If all arguments are empty the result is also empty.

Examples:

Function Value Arguments
min 0 2   3 7
Min 2 2   3 7
avg 3 2   3 7
Avg 4 2   3 7
Cnt 3 2   3 7

There is also: sign function which gives -1, 0, 1 as a result.

Conditional function

The function if allows to choose one of two arguments (argument 2 or 3) as a result depending on the value of first argument.

Scaling function

There are four function which can be used to calculate final note in used on our faculty scale: 0, 2, 3, 3.5, 4, 4.5, 5. This functions have names: skalal, skalap, skalalk, skalapk. All this functions have seven arguments defining levels for appropriate notes. Functions skalal and skalalk include the level to the higher note while: skalap and skalapk to lower note (as it is presented on following pictures).

Functions skalalk and skalapk are displaing different notes in different colors: 5.0 4.5 4.0 3.5 3.0 2.0 0.0 .

Serwer STUDIA3 WEiTI
2024.11.23 21:53.56