Navigation

Operators and Keywords

Function List:

C++ API

: computer ()
: c = computer ()
: [c, maxsize] = computer ()
: [c, maxsize, endian] = computer ()
: arch = computer ("arch")

Print or return a string of the form cpu-vendor-os that identifies the type of computer that Octave is running on.

If invoked with an output argument, the value is returned instead of printed. For example:

computer ()
   -| i586-pc-linux-gnu

mycomp = computer ()
   ⇒ mycomp = "i586-pc-linux-gnu"

If two output arguments are requested, also return the maximum number of elements for an array. This will depend on whether Octave has been compiled with 32-bit or 64-bit index vectors.

If three output arguments are requested, also return the byte order of the current system as a character ("B" for big-endian or "L" for little-endian).

If the argument "arch" is specified, return a string indicating the architecture of the computer on which Octave is running.

See also: isunix, ismac, ispc.

Package: octave