6.1. Library sites

The Orc Standard Library provides a variety of sites, functions, and types for use in Orc programs. These sites are declared in the Orc prelude, a sequence of declarations which is implicitly included in all Orc programs.

Orc programs are expected to rely on the host language and environment for all but the most essential sites. For example, in the Java implementation of Orc, the entire Java standard library is available to Orc programs via import class declarations. Therefore, the Orc standard library aims only to provide convenience for the most common Orc idioms, not the complete set of features needed for general-purpose programming.

6.1.1. Examples

Using a standard library site
{- The Floor site, also called the greatest integer function or integer value -}

Floor(2.5)

{-
OUTPUT:
2
-}
Another standard library site: Ift
{- Orc's conditional site: Ift(), publishes a signal if the argument is true -}

Ift(1 :> 0) >> "correct"

{-
OUTPUT:
"correct"
-}

6.1.2. Related Links

Related Reference Topics