4.5 Special operators
The fussy language defines the following special operators:
- ’:=’: For assignment of partial results/sub-expression
values.
The partial assignment operator := assigns value of
partial results to variables. Expression like
pvar:=val does not propagate the errors on the
val but instead transfers all the required
information for error propagation to the variable
pvar (see Section
Sub-expressions). Expressions like
sin(x:=0.1pm0.02) are equivalent to
x:=0.1pm0.02;sin(x);.
- ’pm’: For associating an error with numerical values.
E.g. 10 +/- 1.0 is expressed as 10pm1.
- ’<expr>.rms’, ’<expr>.val’: For extracting the associated error
and the value of the expression <expr>. E.g. x.rms
is the error associated with x while x.val is the
value of x.
- ’<expr>%<format>’: Sets the print format of the result of the
expression <expr> to the printf style format <format>.
E.g. x%10.5f will print the value of x as a float in a
10 character field with 5 places after decimal.
- ’<var>.’: Operator to set the default print format of a variable.
E.g. x.=%7.2f will replace the default printf format (%10.5f)
by %7.2f.