Next: Other Relations, Previous: Arithmetic, Up: Built-Ins [Contents][Index]

Returns the current time.

` now: () -> num`

Returns the lapsed time in seconds since this qulog process was started

` exec_time: () -> num`

Returns the time at which this qulog process was started

` start_time: () -> num`

Returns a random number in `[0,1)`

.

` random_num: () -> num`

Returns a random number in the interval `[Lower, Upper]`

.

` random_int: (int, int) -> num`

Returns the union of sets `S1`

and `S2`

.

` union: ({T}, {T}) -> {T}`

Returns the intersection of sets `S1`

and `S2`

.

` inter: ({T}, {T}) -> {T}`

Returns the set difference of sets `S1`

and `S2`

.

` diff: ({T}, {T}) -> {T}`

Returns the concatination of lists `L1`

and `L2`

.

` <> : ([T], [T]) -> [T]`

Returns the concatination of strings `S1`

and `S2`

.

` ++ : (string, string) -> string`

Returns the length of the list, set, or string `L`

.

`# : [T] -> nat | {T} -> nat | string -> nat`

Returns the compound term obtained by applying `F`

to `Args`

.

`@.. : (term, [term]) -> term`

Example:

| ?? @..(a, [1,2]). a(1, 2) : term

`@..`

can also be used to split up a compound term as in the following example.

| ?? a(1,2) =? F@..Args. F = a : atom Args = [1, 2] : [nat]

Here `Name`

is an atom that must have been initialised with a statement

`int Name:=Integer`

, e.g. `int count:=0`

or

`num Name:=Number`

, e.g. `num savings:=678.50`

in the program. It returns the current value associated with `Name`

which can be updated by primitive actions (see :=).

Next: Other Relations, Previous: Arithmetic, Up: Built-Ins [Contents][Index]