Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > d92aa75c2d384ff9f513aed09a46f703 > files > 204

parrot-doc-3.1.0-2.mga1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Parrot  - System Interaction Dynops</title>
        <link rel="stylesheet" type="text/css"
            href="../../../resources/parrot.css"
            media="all">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    </head>
    <body>
        <div id="wrapper">
            <div id="header">

                <a href="http://www.parrot.org">
                <img border=0 src="../../../resources/parrot_logo.png" id="logo" alt="parrot">
                </a>
            </div> <!-- "header" -->
            <div id="divider"></div>
            <div id="mainbody">
                <div id="breadcrumb">
                    <a href="../../../html/index.html">Home</a> &raquo; <a href="../../../html/ops.html">Opcodes</a> &raquo; System Interaction Dynops
                </div>

<h1><a name="NAME"
>NAME</a></h1>

<p>sys.ops &#45; System Interaction Dynops</p>

<h1><a name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>Operations that allow the user to interact with the system.</p>

<dl>
<dt><a name="gmtime(out_STR,_in_INT)"
><b>gmtime</b>(out STR,
in INT)</a></dt>
Take the integer,
which represents GMT epoch&#45;seconds,
and turn it into a formatted string.
<dt><a name="localtime(out_STR,_in_INT)"
><b>localtime</b>(out STR,
in INT)</a></dt>
Take the integer,
which represents GMT epoch&#45;seconds,
and turn it into a formatted string.
The time is adjusted to localtime before formatting.
<dt><a name="decodetime(out_PMC,_in_INT)"
><b>decodetime</b>(out PMC,
in INT)</a></dt>
Take the integer,
which represents GMT epoch&#45;seconds,
and return an Array PMC which represents the decoded time.
The array elements are (include &#34;tm.pasm&#34; for the constants):
<dl>
<dt><a name="0,_.TM_SEC"
>0,
.TM_SEC</a></dt>
Seconds (0&#45;60)
<dt><a name="1,_.TM_MIN"
>1,
.TM_MIN</a></dt>
Minutes (0&#45;59)
<dt><a name="2,_.TM_HOUR"
>2,
.TM_HOUR</a></dt>
Hours (0&#45;23)
<dt><a name="3,_.TM_MDAY"
>3,
.TM_MDAY</a></dt>
Day of month (1&#45;31)
<dt><a name="4,_.TM_MON"
>4,
.TM_MON</a></dt>
Month of year (1&#45;12) (Note,
<b>actual</b> month,
not month &#45; 1)
<dt><a name="5,_.TM_YEAR"
>5,
.TM_YEAR</a></dt>
Year (note,
<b>actual</b> year.
The year 2004 comes back as 2004,
not 104)
<dt><a name="6,_.TM_WDAY"
>6,
.TM_WDAY</a></dt>
Day of week.
Sunday is day 0
<dt><a name="7,_.TM_YDAY"
>7,
.TM_YDAY</a></dt>
Day of year (0&#45;365)
<dt><a name="8,_.TM_ISDST"
>8,
.TM_ISDST</a></dt>
Daylight savings/summer time in effect</dl>
Timezone name will be GMT and offset will be 0,
since the time is taken and decoded as GMT.
<dt><a name="decodelocaltime(out_PMC,_in_INT)"
><b>decodelocaltime</b>(out PMC,
in INT)</a></dt>
Take the passed in integer,
which represents GMT epoch&#45;seconds,
and return an array as in decodetime.
The time is first shifted to localtime before decoding.
<dt><a name="sysinfo(out_STR,_in_INT)"
><b>sysinfo</b>(out STR,
in INT)</a></dt>
Return system information.
The values it returns depends on what you ask.
They are:
<dl>
<dt><a name="PARROT_INTSIZE_The_size_of_a_platform_integer"
><b><code>PARROT_INTSIZE</b></code> The size of a platform integer</a></dt>

<dt><a name="PARROT_FLOATSIZE_The_size_of_a_platform_float"
><b><code>PARROT_FLOATSIZE</b></code> The size of a platform float</a></dt>

<dt><a name="PARROT_POINTERSIZE_The_size_of_a_platform_pointer_(Largest_possible_data_pointer)"
><b><code>PARROT_POINTERSIZE</b></code> The size of a platform pointer (Largest possible data pointer)</a></dt>

<dt><a name="PARROT_INTMAX_The_maximum_value_of_a_platform_integer"
><b><code>PARROT_INTMAX</b></code> The maximum value of a platform integer</a></dt>

<dt><a name="PARROT_INTMIN_The_minimum_value_of_a_platform_integer"
><b><code>PARROT_INTMIN</b></code> The minimum value of a platform integer</a></dt>
</dl>

<dt><a name="sysinfo(out_INT,_in_INT)"
><b>sysinfo</b>(out INT,
in INT)</a></dt>
Return system information.
The values it returns depends on what you ask.
They are:
<dl>
<dt><a name="PARROT_OS_The_OS_name"
><b><code>PARROT_OS</b></code> The OS name</a></dt>
This is something like &#34;OS X&#34;,
&#34;MacOS&#34;,
&#34;Windows&#34;,
or &#34;VMS&#34;.
<dt><a name="PARROT_OS_VERSION_The_OS_version_string"
><b><code>PARROT_OS_VERSION</b></code> The OS version string</a></dt>
This is the current (hopefully) OS Version.
For OSes that have plain version numbers it will be the version number.
For OSes that name their versions,
it will be the version name.On HP/UX,
this may be something like 11.2,
while on Windows it may be &#34;95&#34;,
&#34;98&#34;,
&#34;2000&#34;,
&#34;NT&#34;,
&#34;ME&#34;,
or &#34;XP&#34;.
<dt><a name="PARROT_OS_VERSION_NUMBER_The_OS_version_number_string"
><b><code>PARROT_OS_VERSION_NUMBER</b></code> The OS version number string</a></dt>
On OSes that don&#39;t name themselves,
this will be the same as what&#39;s returned in the OS version string.
On OSes that <i>do</i> name themselves,
this will be a more specific version number.
In all cases it is OS dependent.
<dt><a name="CPU_ARCH_The_CPU_architecture"
><b><code>CPU_ARCH</b></code> The CPU architecture</a></dt>
The name of the CPU family,
such as &#34;VAX&#34;,
&#34;Alpha&#34;,
&#34;PPC&#34;,
or &#34;x86&#34;.
<dt><a name="CPU_TYPE_The_CPU_model"
><b><code>CPU_TYPE</b></code> The CPU model</a></dt>
The model name of the current system&#39;s CPU.
This is something like &#34;EV68&#34;,
&#34;Athlon&#34;,
or &#34;Pentium III&#34;.</dl>
Note that some of these values may be set at Parrot compile time,
rather than at runtime,
if the system has no reliable way to fetch the data dynamically,
or if there is no way the value can change.
Also,
the value returned may be somewhat misleading&#45;&#45;Parrot running under a VirtualPC window will report &#34;Windows&#34; as its OS and &#34;x86&#34; as its CPU,
even if it&#39;s really running on an OS X system.</dl>

<h1><a name="COPYRIGHT"
>COPYRIGHT</a></h1>

<p>Copyright (C) 2010,
Parrot Foundation.</p>

<h1><a name="LICENSE"
>LICENSE</a></h1>

<p>This program is free software.
It is subject to the same license as the Parrot interp itself.</p>
            </div> <!-- "mainbody" -->
            <div id="divider"></div>
            <div id="footer">
	        Copyright &copy; 2002-2011, Parrot Foundation.
            </div>
        </div> <!-- "wrapper" -->
    </body>
</html>