Next: , Previous: Built-in functions and constants, Up: Syntax   [Contents][Index]


4.5 Special operators

The fussy language defines the following special operators:

  1. :=’: 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);.

  2. pm’: For associating an error with numerical values. E.g. 10 +/- 1.0 is expressed as 10pm1.
  3. <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.
  4. <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.
  5. <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.