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.
{- The Floor site, also called the greatest integer function or integer value -} Floor(2.5) {- OUTPUT: 2 -}
{- Orc's conditional site: Ift(), publishes a signal if the argument is true -} Ift(1 :> 0) >> "correct" {- OUTPUT: "correct" -}
Related Reference Topics