oct

Gamma: Version 4.0
Prev |  | Next

# `oct`

`oct` -- converts numbers into octal form.

## Syntax

    oct (number)

## Arguments

`number`

  Any number.

## Returns

An integer number in octal format.

## Description

This function casts any number to an integer, and returns it in an octal representation. Floating point numbers are truncated.

## Example

        Gamma> oct(12);
        0o14
        Gamma> oct(12.86223);
        0o14
        Gamma> oct(0x3b);
        0o73
        Gamma> oct(0b0101101);
        0o55
        Gamma>

## See Also

`bin`, `dec`, `hex`

Prev | Home | Next
`number` | Up | `symbol`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.