~ubuntu-branches/ubuntu/wily/afnix/wily

« back to all changes in this revision

Viewing changes to src/mod/sys/doc/appendix-i.xml

  • Committer: Bazaar Package Importer
  • Author(s): Anibal Monsalve Salazar
  • Date: 2011-03-16 21:31:18 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110316213118-gk4k3ez3e5d2huna
Tags: 2.0.0-1
* QA upload.
* New upstream release
* Debian source format is 3.0 (quilt)
* Fix debhelper-but-no-misc-depends
* Fix ancient-standards-version
* Fix package-contains-linda-override
* debhelper compatibility is 7
* Fix dh-clean-k-is-deprecated

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
<!-- = incidental  or special  damages arising  in any way out of the use = -->
14
14
<!-- = of this software.                                                  = -->
15
15
<!-- ====================================================================== -->
16
 
<!-- = copyright (c) 1999-2007 - amaury darsch                            = -->
 
16
<!-- = copyright (c) 1999-2011 - amaury darsch                            = -->
17
17
<!-- ====================================================================== -->
18
18
 
19
19
<appendix module="sys" number="i">
20
20
  <title>Standard system services reference</title>
21
21
 
22
 
  <p>
23
 
  This appendix is a reference of the <afnix/> standard system services
24
 
  module.
25
 
  </p>
26
 
 
27
 
  <table>
28
 
   <title>Standard system services module</title>
29
 
   <tr><th>Symbol</th><th>Description</th></tr>
30
 
   <tr><td>afnix-sys</td><td>module</td></tr>
31
 
   <tr><td>afnix:sys</td><td>nameset</td></tr>
32
 
  </table>
33
 
 
34
22
  <!-- =================================================================== -->
35
23
  <!-- = time object                                                     = -->
36
24
  <!-- =================================================================== -->
40
28
 
41
29
    <!-- synopsis -->
42
30
    <p>
43
 
    The <code>Time</code> class is a simple class used to manipulate
44
 
    time. The <afnix/> system operates with the afnix time coordinated
45
 
    or ATC which uses the reference of Jan 1st 0000 in a modified
46
 
    <em>proleptic gregorian calendar</em>. Note that the time can be
47
 
    negative. Although, the class provides several methods to access
48
 
    the time fields, it is also possible to get a string
49
 
    representation that conforms to ISO-8601 or to RFC-2822. 
50
 
    The resolution is in seconds. With 1 argument, the object is
51
 
    initialized with the time clock specified as an integer
52
 
    argument. With 3 arguments, the time is expressed with its
53
 
    different elements.
 
31
      The <code>Time</code> class is a simple class used to manipulate
 
32
      time. The <afnix/> system operates with a special coordinated
 
33
      time which uses the reference of Jan 1st 0000 in a modified
 
34
      <em>proleptic gregorian calendar</em>. Note that the time can be
 
35
      negative. Although, the class provides several methods to access
 
36
      the time fields, it is also possible to get a string
 
37
      representation that conforms to ISO-8601 or to RFC-2822. 
 
38
      The resolution is in seconds. With 1 argument, the object is
 
39
      initialized with the time clock specified as an integer
 
40
      argument. With 3 arguments, the time is expressed with its
 
41
      different elements.
54
42
    </p>
55
43
 
56
44
    <!-- predicate -->
63
51
 
64
52
    <!-- constructors -->
65
53
    <ctors>
66
 
     <ctor>
67
 
      <name>Time</name>
68
 
      <args>none</args>
69
 
      <p>
70
 
      The <code>Time</code> constructor create a time object which is
71
 
      initialized with the current time.
72
 
      </p>
73
 
     </ctor>
74
 
 
75
 
     <ctor>
76
 
      <name>Time</name>
77
 
      <args>Integer</args>
78
 
      <p>
79
 
      The <code>Time</code> constructor create a time object which is
80
 
      initialized with the time argument.
81
 
      </p>
82
 
     </ctor>
83
 
 
84
 
     <ctor>
85
 
      <name>Time</name>
86
 
      <args>Integer Integer Integer</args>
87
 
      <p>
88
 
      The <code>Time</code> constructor create a time object which is
89
 
      initialized with the time specific arguments, which are the
90
 
      hour, the minutes and the seconds.
91
 
      </p>
92
 
     </ctor>
 
54
      <ctor>
 
55
        <name>Time</name>
 
56
        <args>none</args>
 
57
        <p>
 
58
          The <code>Time</code> constructor create a time object which is
 
59
          initialized with the current time.
 
60
        </p>
 
61
      </ctor>
 
62
 
 
63
      <ctor>
 
64
        <name>Time</name>
 
65
        <args>Integer</args>
 
66
        <p>
 
67
          The <code>Time</code> constructor create a time object which is
 
68
          initialized with the time argument.
 
69
        </p>
 
70
      </ctor>
 
71
 
 
72
      <ctor>
 
73
        <name>Time</name>
 
74
        <args>Integer Integer Integer</args>
 
75
        <p>
 
76
          The <code>Time</code> constructor create a time object which is
 
77
          initialized with the time specific arguments, which are the
 
78
          hour, the minutes and the seconds.
 
79
        </p>
 
80
      </ctor>
93
81
    </ctors>
94
82
 
95
83
    <!-- methods -->
96
84
    <methods>
97
 
     <meth>
98
 
      <name>add</name>
99
 
      <retn>none</retn>
100
 
      <args>Integer</args>
101
 
      <p>
102
 
      The <code>add</code> method adds the time argument in seconds to 
103
 
      the current time value This method is useful to compute a time
104
 
      in the future, in reference to the current time.
105
 
      </p>
106
 
     </meth>
107
 
 
108
 
     <meth>
109
 
      <name>add-minutes</name>
110
 
      <retn>none</retn>
111
 
      <args>Integer</args>
112
 
      <p>
113
 
      The <code>add-minutes</code> method adds one or several minutes to
114
 
      the current time value. This method is useful to compute a time
115
 
      in the future, in reference to the current time.
116
 
      </p>
117
 
     </meth>
118
 
 
119
 
     <meth>
120
 
      <name>add-hours</name>
121
 
      <retn>none</retn>
122
 
      <args>Integer</args>
123
 
      <p>
124
 
      The <code>add-hour</code> method adds one or several hours to
125
 
      the current time value. This method is useful to compute a time
126
 
      in the future, in reference to the current time.
127
 
      </p>
128
 
     </meth>
129
 
 
130
 
     <meth>
131
 
      <name>add-days</name>
132
 
      <retn>none</retn>
133
 
      <args>Integer</args>
134
 
      <p>
135
 
      The <code>add-days</code> method adds one or several days to
136
 
      the current time value. This method is useful to compute a time
137
 
      in the future, in reference to the current time.
138
 
      </p>
139
 
     </meth>
140
 
 
141
 
     <meth>
142
 
      <name>set-time</name>
143
 
      <retn>none</retn>
144
 
      <args>Integer</args>
145
 
      <p>
146
 
      The <code>set-time</code> method set the absolute time in seconds.
147
 
      </p>
148
 
     </meth>
149
 
 
150
 
     <meth>
151
 
      <name>get-time</name>
152
 
      <retn>Integer</retn>
153
 
      <args>none</args>
154
 
      <p>
155
 
      The <code>get-time</code> method returns absolute time in seconds
156
 
      </p>
157
 
     </meth>
158
 
 
159
 
     <meth>
160
 
      <name>seconds</name>
161
 
      <retn>Integer</retn>
162
 
      <args>none|Boolean</args>
163
 
      <p>
164
 
      The <code>seconds</code> method returns the number of
165
 
      seconds after the minute. Without argument, the number of
166
 
      seconds is computed in reference to the local time. With a
167
 
      boolean argument set to <code>true</code>, the number of seconds
168
 
      is computed in reference to the UTC time. If the argument is
169
 
      false, the local time is used. The returned value is the range 0
170
 
      to 60.
171
 
      </p>
172
 
     </meth>
173
 
 
174
 
     <meth>
175
 
      <name>minutes</name>
176
 
      <retn>Integer</retn>
177
 
      <args>none|Boolean</args>
178
 
      <p>
179
 
      The <code>minutes</code> method returns the number of
180
 
      minutes after the hour. Without argument, the number of
181
 
      minutes is computed in reference to the local time. With a
182
 
      boolean argument set to <code>true</code>, the number of minutes
183
 
      is computed in reference to the UTC time. If the argument is
184
 
      false, the local time is used. The returned value is the range 0
185
 
      to 60.
186
 
      </p>
187
 
     </meth>
188
 
 
189
 
     <meth>
190
 
      <name>hours</name>
191
 
      <retn>Integer</retn>
192
 
      <args>none|Boolean</args>
193
 
      <p>
194
 
      The <code>hours</code> method returns the number of hours
195
 
      since midnight. Without argument, the number of
196
 
      hours is computed in reference to the local time. With a
197
 
      boolean argument set to <code>true</code>, the number of hours
198
 
      is computed in reference to the UTC time. If the argument is
199
 
      false, the local time is used. The returned value is the range 0
200
 
      to 23.
201
 
      </p>
202
 
     </meth>
203
 
    
204
 
     <meth>
205
 
      <name>format</name>
206
 
      <retn>String</retn>
207
 
      <args>none|Boolean</args>
208
 
      <p>
209
 
      The <code>format</code> method returns a formatted representation
210
 
      of the time in the form of <em>hh:mm:ss</em>. Without argument,
211
 
      the time is computed in reference to the local time. With a
212
 
      boolean argument set to <code>true</code>, the time is computed
213
 
      in reference to the UTC time. If the argument is false, the
214
 
      local time is used.
215
 
      </p>
216
 
     </meth>
217
 
 
218
 
     <meth>
219
 
      <name>to-iso</name>
220
 
      <retn>String</retn>
221
 
      <args>none|Boolean</args>
222
 
      <p>
223
 
      The <code>to-iso</code> method returns a formatted representation
224
 
      of the time as specified by ISO-8601. Without argument, the time
225
 
      is computed in reference to the local time. With a boolean
226
 
      argument set to <code>true</code>, the time is computed in
227
 
      reference to the UTC time. If the argument is false, the 
228
 
      local time is used.
229
 
      </p>
230
 
     </meth>
231
 
 
232
 
     <meth>
233
 
      <name>to-rfc</name>
234
 
      <retn>String</retn>
235
 
      <args>none</args>
236
 
      <p>
237
 
      The <code>to-rfc</code> method returns a formatted representation
238
 
      of the time as specified by RFC-2822. The time is computed in
239
 
      reference to the local time.
240
 
      </p>
241
 
     </meth>
 
85
      <meth>
 
86
        <name>add</name>
 
87
        <retn>none</retn>
 
88
        <args>Integer</args>
 
89
        <p>
 
90
          The <code>add</code> method adds the time argument in seconds to 
 
91
          the current time value This method is useful to compute a time
 
92
          in the future, in reference to the current time.
 
93
        </p>
 
94
      </meth>
 
95
 
 
96
      <meth>
 
97
        <name>add-minutes</name>
 
98
        <retn>none</retn>
 
99
        <args>Integer</args>
 
100
        <p>
 
101
          The <code>add-minutes</code> method adds one or several minutes to
 
102
          the current time value. This method is useful to compute a time
 
103
          in the future, in reference to the current time.
 
104
        </p>
 
105
      </meth>
 
106
 
 
107
      <meth>
 
108
        <name>add-hours</name>
 
109
        <retn>none</retn>
 
110
        <args>Integer</args>
 
111
        <p>
 
112
          The <code>add-hour</code> method adds one or several hours to
 
113
          the current time value. This method is useful to compute a time
 
114
          in the future, in reference to the current time.
 
115
        </p>
 
116
      </meth>
 
117
 
 
118
      <meth>
 
119
        <name>add-days</name>
 
120
        <retn>none</retn>
 
121
        <args>Integer</args>
 
122
        <p>
 
123
          The <code>add-days</code> method adds one or several days to
 
124
          the current time value. This method is useful to compute a time
 
125
          in the future, in reference to the current time.
 
126
        </p>
 
127
      </meth>
 
128
 
 
129
      <meth>
 
130
        <name>set-time</name>
 
131
        <retn>none</retn>
 
132
        <args>Integer</args>
 
133
        <p>
 
134
          The <code>set-time</code> method set the absolute time in seconds.
 
135
        </p>
 
136
      </meth>
 
137
 
 
138
      <meth>
 
139
        <name>get-time</name>
 
140
        <retn>Integer</retn>
 
141
        <args>none|Boolean</args>
 
142
        <p>
 
143
          The <code>get-time</code> method returns absolute time in
 
144
          seconds. Without argument, the absolute time is computed in
 
145
          reference to the UTC time. With a boolean argument set
 
146
          to <code>true</code>, the time is computed in reference to the
 
147
          UTC time. If the argument is <code>false</code>, the local time
 
148
          is used.
 
149
        </p>
 
150
      </meth>
 
151
 
 
152
      <meth>
 
153
        <name>seconds</name>
 
154
        <retn>Integer</retn>
 
155
        <args>none|Boolean</args>
 
156
        <p>
 
157
          The <code>seconds</code> method returns the number of
 
158
          seconds after the minute. Without argument, the number of
 
159
          seconds is computed in reference to the UTC time. With a
 
160
          boolean argument set to <code>true</code>, the number of seconds
 
161
          is computed in reference to the UTC time. If the argument is
 
162
          <code>false</code>, the local time is used. The returned value
 
163
          is the range 0 to 60.
 
164
        </p>
 
165
      </meth>
 
166
 
 
167
      <meth>
 
168
        <name>minutes</name>
 
169
        <retn>Integer</retn>
 
170
        <args>none|Boolean</args>
 
171
        <p>
 
172
          The <code>minutes</code> method returns the number of
 
173
          minutes after the hour. Without argument, the number of
 
174
          minutes is computed in reference to the UTC time. With a
 
175
          boolean argument set to <code>true</code>, the number of minutes
 
176
          is computed in reference to the UTC time. If the argument is
 
177
          <code>false</code>, the local time is used. The returned value
 
178
          is the range 0 to 60.
 
179
        </p>
 
180
      </meth>
 
181
 
 
182
      <meth>
 
183
        <name>hours</name>
 
184
        <retn>Integer</retn>
 
185
        <args>none|Boolean</args>
 
186
        <p>
 
187
          The <code>hours</code> method returns the number of hours
 
188
          since midnight. Without argument, the number of
 
189
          hours is computed in reference to the local time. With a
 
190
          boolean argument set to <code>true</code>, the number of hours
 
191
          is computed in reference to the UTC time. If the argument is
 
192
          <code>false</code>, the local time is used. The returned value
 
193
          is the range 0 to 23.
 
194
        </p>
 
195
      </meth>
 
196
      
 
197
      <meth>
 
198
        <name>format</name>
 
199
        <retn>String</retn>
 
200
        <args>none|Boolean</args>
 
201
        <p>
 
202
          The <code>format</code> method returns a formatted representation
 
203
          of the time in the form of <em>hh:mm:ss</em>. Without argument,
 
204
          the time is computed in reference to the local time. With a
 
205
          boolean argument set to <code>true</code>, the time is computed
 
206
          in reference to the UTC time. If the argument
 
207
          is <code>false</code>, the local time is used.
 
208
        </p>
 
209
      </meth>
 
210
 
 
211
      <meth>
 
212
        <name>to-iso</name>
 
213
        <retn>String</retn>
 
214
        <args>none|Boolean</args>
 
215
        <p>
 
216
          The <code>to-iso</code> method returns a formatted representation
 
217
          of the time as specified by ISO-8601. Without argument, the time
 
218
          is computed in reference to the local time. With a boolean
 
219
          argument set to <code>true</code>, the time is computed in
 
220
          reference to the UTC time. If the argument
 
221
          is <code>false</code>, the local time is used.
 
222
        </p>
 
223
      </meth>
 
224
 
 
225
      <meth>
 
226
        <name>to-rfc</name>
 
227
        <retn>String</retn>
 
228
        <args>none|Boolean</args>
 
229
        <p>
 
230
          The <code>to-rfc</code> method returns a formatted representation
 
231
          of the time as specified by RFC-2822. Without argument, the time
 
232
          is computed in reference to the local time. With a boolean
 
233
          argument set to <code>true</code>, the time is computed in
 
234
          reference to the UTC time. If the argument
 
235
          is <code>false</code>, the local time is used.
 
236
        </p>
 
237
      </meth>
 
238
 
 
239
      <meth>
 
240
        <name>get-base-day</name>
 
241
        <retn>Integer</retn>
 
242
        <args>none</args>
 
243
        <p>
 
244
          The <code>get-base-day</code> method returns the absolute time
 
245
          rounded to the beginning of the day.
 
246
        </p>
 
247
      </meth>
 
248
 
242
249
    </methods>
243
250
  </object>
244
251
 
251
258
 
252
259
    <!-- synopsis -->
253
260
    <p>
254
 
    The <code>Date</code> is a derived class designed to manipulate
255
 
    dates. The date computation is based on an <em>modified proleptic
256
 
    gregorian</em> calendar. This proleptic feature means that the
257
 
    actual calendar (gregorian) is extended beyond year 1582 (its
258
 
    introduction year) and modified in order to support the year
259
 
    0. This kind of calendar is somehow similar to the astronomical
260
 
    gregorian calendar except that the reference date is 0 for the ATC
261
 
    system -- <afnix/> time coordinated--. This method presents the 
262
 
    advantage to support negative time. It should be noted that the 0 
263
 
    reference does not means year 1BC since year 0 did not exist at that 
264
 
    time (the concept of zero is fairly new) and more important, the date 
265
 
    expressed in the form 1BC generally refers to the Julian calendar 
266
 
    since the date is before 1582. Although, the class provides several 
267
 
    methods to access the individual fields, it is also possible to get a
268
 
    string representation that conforms to ISO-8601 or to
269
 
    RFC-2822. With 1 argument, the date is initialized with the time
270
 
    clock specified as an integer argument. With 3 or 6 arguments, the
271
 
    date is expressed with its different elements.
 
261
      The <code>Date</code> is a derived class designed to manipulate
 
262
      dates. The date computation is based on an <em>modified proleptic
 
263
      gregorian</em> calendar. This proleptic feature means that the
 
264
      actual calendar (gregorian) is extended beyond year 1582 (its
 
265
      introduction year) and modified in order to support the year
 
266
      0. This kind of calendar is somehow similar to the astronomical
 
267
      gregorian calendar except that the reference date is 0 for
 
268
      special coordinated time. This method presents the 
 
269
      advantage to support negative time. It should be noted that the 0 
 
270
      reference does not means year 1BC since year 0 did not exist at that 
 
271
      time (the concept of zero is fairly new) and more important, the date 
 
272
      expressed in the form 1BC generally refers to the Julian calendar 
 
273
      since the date is before 1582. Although, the class provides several 
 
274
      methods to access the individual fields, it is also possible to get a
 
275
      string representation that conforms to ISO-8601 or to
 
276
      RFC-2822. With 1 argument, the date is initialized with the time
 
277
      clock specified as an integer argument. With 3 or 6 arguments, the
 
278
      date is expressed with its different elements.
272
279
    </p>
273
280
 
274
281
    <!-- predicate -->
281
288
 
282
289
    <!-- constructors -->
283
290
    <ctors>
284
 
     <ctor>
285
 
      <name>Date</name>
286
 
      <args>none</args>
287
 
      <p>
288
 
      The <code>Date</code> constructor creates a date object which is
289
 
      initialized with the current time.
290
 
      </p>
291
 
     </ctor>
292
 
 
293
 
     <ctor>
294
 
      <name>date</name>
295
 
      <args>Integer</args>
296
 
      <p>
297
 
      The <code>Date</code> constructor creates a date object which is
298
 
      initialized with the time argument.
299
 
      </p>
300
 
     </ctor>
301
 
 
302
 
     <ctor>
303
 
      <name>Date</name>
304
 
      <args>Integer Integer Integer</args>
305
 
      <p>
306
 
      The <code>Date</code> constructor creates a date object which is
307
 
      initialized with the date specific arguments, which are the
308
 
      year, the month and the day in the month.
309
 
      </p>
310
 
     </ctor>
311
 
 
312
 
     <ctor>
313
 
      <name>Date</name>
314
 
      <args>Integer Integer Integer Integer Integer Integer</args>
315
 
      <p>
316
 
      The <code>Date</code> constructor creates a date object which is
317
 
      initialized with the date specific arguments, which are the
318
 
      year, the month, the day in the month, the hours, the minutes
319
 
      and the seconds.
320
 
      </p>
321
 
     </ctor>
 
291
      <ctor>
 
292
        <name>Date</name>
 
293
        <args>none</args>
 
294
        <p>
 
295
          The <code>Date</code> constructor creates a date object which is
 
296
          initialized with the current time.
 
297
        </p>
 
298
      </ctor>
 
299
 
 
300
      <ctor>
 
301
        <name>date</name>
 
302
        <args>Integer</args>
 
303
        <p>
 
304
          The <code>Date</code> constructor creates a date object which is
 
305
          initialized with the time argument.
 
306
        </p>
 
307
      </ctor>
 
308
 
 
309
      <ctor>
 
310
        <name>Date</name>
 
311
        <args>Integer Integer Integer</args>
 
312
        <p>
 
313
          The <code>Date</code> constructor creates a date object which is
 
314
          initialized with the date specific arguments, which are the
 
315
          year, the month and the day in the month.
 
316
        </p>
 
317
      </ctor>
 
318
 
 
319
      <ctor>
 
320
        <name>Date</name>
 
321
        <args>Integer Integer Integer Integer Integer Integer</args>
 
322
        <p>
 
323
          The <code>Date</code> constructor creates a date object which is
 
324
          initialized with the date specific arguments, which are the
 
325
          year, the month, the day in the month, the hours, the minutes
 
326
          and the seconds.
 
327
        </p>
 
328
      </ctor>
322
329
    </ctors>
323
330
 
324
331
    <!-- methods -->
325
332
    <methods>
326
 
     <meth>
327
 
      <name>year</name>
328
 
      <retn>Integer</retn>
329
 
      <args>none</args>
330
 
      <p>
331
 
      The <code>year</code> method returns the date year. the returned
332
 
      value is an absolute year value which can be negative.
333
 
      </p>
334
 
     </meth>
335
 
 
336
 
     <meth>
337
 
      <name>month</name>
338
 
      <retn>Integer</retn>
339
 
      <args>none</args>
340
 
      <p>
341
 
      The <code>month</code> method returns the month in the year. The
342
 
      returned value is the range 1 to 12.
343
 
      </p>
344
 
     </meth>
345
 
 
346
 
     <meth>
347
 
      <name>day</name>
348
 
      <retn>Integer</retn>
349
 
      <args>none</args>
350
 
      <p>
351
 
      The <code>day</code> method returns the day in the
352
 
      month. The returned value is the range 1 to 31.
353
 
      </p>
354
 
     </meth>
355
 
 
356
 
     <meth>
357
 
      <name>week-day</name>
358
 
      <retn>Integer</retn>
359
 
      <args>none</args>
360
 
      <p>
361
 
      The <code>week-day</code> method returns the day in the
362
 
      week. The returned value is the range 0 to 6 in reference to Sunday.
363
 
      </p>
364
 
     </meth>
365
 
 
366
 
     <meth>
367
 
      <name>year-day</name>
368
 
      <retn>Integer</retn>
369
 
      <args>none</args>
370
 
      <p>
371
 
      The <code>year-day</code> method returns the day in the
372
 
      year. The returned value is the range 1 to 366 in reference to
373
 
      January 1st.
374
 
      </p>
375
 
     </meth>
376
 
 
377
 
     <meth>
378
 
      <name>map-day</name>
379
 
      <retn>String</retn>
380
 
      <args>none</args>
381
 
      <p>
382
 
      The <code>map-day</code> method returns a formatted representation
383
 
      of the day.
384
 
      </p>
385
 
     </meth>
386
 
 
387
 
     <meth>
388
 
      <name>map-month</name>
389
 
      <retn>String</retn>
390
 
      <args>none</args>
391
 
      <p>
392
 
      The <code>map-month</code> method returns a formatted representation
393
 
      of the month.
394
 
      </p>
395
 
     </meth>
396
 
 
397
 
     <meth>
398
 
      <name>format</name>
399
 
      <retn>String</retn>
400
 
      <args>none|Boolean</args>
401
 
      <p>
402
 
      The <code>format</code> method returns a formatted representation
403
 
      of the date. Without argument, the time is computed in reference
404
 
      to the local time. With a boolean argument set to
405
 
      <code>true</code>, the time is computed in reference to the UTC
406
 
      time. If the argument is false, the local time is used.
407
 
      </p>
408
 
     </meth>
409
 
 
410
 
     <meth>
411
 
      <name>to-iso</name>
412
 
      <retn>String</retn>
413
 
      <args>none|Boolean</args>
414
 
      <p>
415
 
      The <code>to-iso</code> method returns a formatted representation
416
 
      of the date as specified by ISO-8601. Without argument, the time
417
 
      is computed in reference to the local time. With a boolean
418
 
      argument set to <code>true</code>, the time is computed in
419
 
      reference to the UTC time. If the argument is false, the 
420
 
      local time is used.
421
 
      </p>
422
 
     </meth>
423
 
 
424
 
     <meth>
425
 
      <name>to-rfc</name>
426
 
      <retn>String</retn>
427
 
      <args>none</args>
428
 
      <p>
429
 
      The <code>to-rfc</code> method returns a formatted representation
430
 
      of the date as specified by RFC-2822. The time is computed in
431
 
      reference to the local time.
432
 
      </p>
433
 
     </meth>
434
 
 
435
 
     <meth>
436
 
      <name>to-date</name>
437
 
      <retn>String</retn>
438
 
      <args>none</args>
439
 
      <p>
440
 
      The <code>to-date</code> method returns a formatted representation
441
 
      of the date only as specified by ISO-8601. With this method, the
442
 
      time value is not included in the representation.
443
 
      </p>
444
 
     </meth>
445
 
 
446
 
     <meth>
447
 
      <name>to-time</name>
448
 
      <retn>String</retn>
449
 
      <args>none|Boolean</args>
450
 
      <p>
451
 
      The <code>to-time</code> method returns a formatted representation
452
 
      of the time as returned by the <code>Time format</code> method.
453
 
      </p>
454
 
     </meth>
455
 
 
456
 
     <meth>
457
 
      <name>get-base-day</name>
458
 
      <retn>Integer</retn>
459
 
      <args>none</args>
460
 
      <p>
461
 
      The <code>get-base-day</code> method returns the absolute time
462
 
      rounded to the beginning of the day.
463
 
      </p>
464
 
     </meth>
465
 
 
466
 
     <meth>
467
 
      <name>add-years</name>
468
 
      <retn>none</retn>
469
 
      <args>Integer</args>
470
 
      <p>
471
 
      The <code>add-years</code> method add one or several years to the
472
 
      current date.
473
 
      </p>
474
 
     </meth>
475
 
 
476
 
     <meth>
477
 
      <name>add-months</name>
478
 
      <retn>none</retn>
479
 
      <args>Integer</args>
480
 
      <p>
481
 
      The <code>add-months</code> method add one or several months to the
482
 
      current date.
483
 
      </p>
484
 
     </meth>
 
333
      <meth>
 
334
        <name>year</name>
 
335
        <retn>Integer</retn>
 
336
        <args>none|Boolean</args>
 
337
        <p>
 
338
          The <code>year</code> method returns the date year. the returned
 
339
          value is an absolute year value which can be negative. Without
 
340
          argument, the number of years is computed in reference to the
 
341
          local time. With a boolean argument set to <code>true</code>,
 
342
          the number of years is computed in reference to the UTC time. If
 
343
          the argument is <code>false</code>, the local time is used.
 
344
        </p>
 
345
      </meth>
 
346
 
 
347
      <meth>
 
348
        <name>month</name>
 
349
        <retn>Integer</retn>
 
350
        <args>none|Boolean</args>
 
351
        <p>
 
352
          The <code>month</code> method returns the month in the year. The
 
353
          returned value is the range 1 to 12. Without argument, the number of
 
354
          months is computed in reference to the local time. With a
 
355
          boolean argument set to <code>true</code>, the number of months
 
356
          is computed in reference to the UTC time. If the argument is
 
357
          <code>false</code>, the local time is used.
 
358
        </p>
 
359
      </meth>
 
360
 
 
361
      <meth>
 
362
        <name>day</name>
 
363
        <retn>Integer</retn>
 
364
        <args>none|Boolean</args>
 
365
        <p>
 
366
          The <code>day</code> method returns the day in the
 
367
          month. The returned value is the range 1 to 31. Without argument,
 
368
          the number of days is computed in reference to the local
 
369
          time. With a boolean argument set to <code>true</code>, the
 
370
          number of days is computed in reference to the UTC time. If the
 
371
          argument is <code>false</code>, the local time is used.
 
372
        </p>
 
373
      </meth>
 
374
 
 
375
      <meth>
 
376
        <name>week-day</name>
 
377
        <retn>Integer</retn>
 
378
        <args>none|Boolean</args>
 
379
        <p>
 
380
          The <code>week-day</code> method returns the day in the
 
381
          week. The returned value is the range 0 to 6 in reference to
 
382
          Sunday. Without argument, the day is computed in
 
383
          reference to the local time. With a boolean argument set
 
384
          to <code>true</code>, the day is computed in reference to the
 
385
          UTC time. If the argument is <code>false</code>, the local time
 
386
          is used.
 
387
        </p>
 
388
      </meth>
 
389
 
 
390
      <meth>
 
391
        <name>year-day</name>
 
392
        <retn>Integer</retn>
 
393
        <args>none|Boolean</args>
 
394
        <p>
 
395
          The <code>year-day</code> method returns the day in the
 
396
          year. The returned value is the range 1 to 366 in reference to
 
397
          January 1st. Without argument, the day is computed in
 
398
          reference to the local time. With a boolean argument set
 
399
          to <code>true</code>, the day is computed in reference to the
 
400
          UTC time. If the argument is <code>false</code>, the local time
 
401
          is used.
 
402
        </p>
 
403
      </meth>
 
404
 
 
405
      <meth>
 
406
        <name>map-day</name>
 
407
        <retn>String</retn>
 
408
        <args>none|Boolean</args>
 
409
        <p>
 
410
          The <code>map-day</code> method returns a formatted representation
 
411
          of the day. Without argument, the day is computed in
 
412
          reference to the local time. With a boolean argument set
 
413
          to <code>true</code>, the day is computed in reference to the
 
414
          UTC time. If the argument is <code>false</code>, the local time
 
415
          is used.
 
416
        </p>
 
417
      </meth>
 
418
 
 
419
      <meth>
 
420
        <name>map-month</name>
 
421
        <retn>String</retn>
 
422
        <args>none|Boolean</args>
 
423
        <p>
 
424
          The <code>map-month</code> method returns a formatted representation
 
425
          of the month. Without argument, the month is computed in
 
426
          reference to the local time. With a boolean argument set
 
427
          to <code>true</code>, the month is computed in reference to the
 
428
          UTC time. If the argument is <code>false</code>, the local time
 
429
          is used.
 
430
        </p>
 
431
      </meth>
 
432
 
 
433
      <meth>
 
434
        <name>format</name>
 
435
        <retn>String</retn>
 
436
        <args>none|Boolean</args>
 
437
        <p>
 
438
          The <code>format</code> method returns a formatted representation
 
439
          of the date. Without argument, the time is computed in reference
 
440
          to the local time. With a boolean argument set to
 
441
          <code>true</code>, the time is computed in reference to the UTC
 
442
          time. If the argument is <code>false</code>, the local time is
 
443
          used. 
 
444
        </p>
 
445
      </meth>
 
446
 
 
447
      <meth>
 
448
        <name>to-iso</name>
 
449
        <retn>String</retn>
 
450
        <args>none|Boolean</args>
 
451
        <p>
 
452
          The <code>to-iso</code> method returns a formatted representation
 
453
          of the date as specified by ISO-8601. Without argument, the time
 
454
          is computed in reference to the local time. With a boolean
 
455
          argument set to <code>true</code>, the time is computed in
 
456
          reference to the UTC time. If the argument
 
457
          is <code>false</code>, the local time is used.
 
458
        </p>
 
459
      </meth>
 
460
 
 
461
      <meth>
 
462
        <name>to-web</name>
 
463
        <retn>String</retn>
 
464
        <args>none</args>
 
465
        <p>
 
466
          The <code>to-web</code> method returns a formatted representation
 
467
          of the date as specified by RFC-1123.
 
468
        </p>
 
469
      </meth>
 
470
 
 
471
      <meth>
 
472
        <name>to-rfc</name>
 
473
        <retn>String</retn>
 
474
        <args>none|Boolean</args>
 
475
        <p>
 
476
          The <code>to-rfc</code> method returns a formatted representation
 
477
          of the date as specified by RFC-2822. Without argument, the time
 
478
          is computed in reference to the local time. With a boolean
 
479
          argument set to <code>true</code>, the time is computed in
 
480
          reference to the UTC time. If the argument
 
481
          is <code>false</code>, the local time is used.
 
482
        </p>
 
483
      </meth>
 
484
 
 
485
      <meth>
 
486
        <name>to-date</name>
 
487
        <retn>String</retn>
 
488
        <args>none|Boolean</args>
 
489
        <p>
 
490
          The <code>to-date</code> method returns a formatted representation
 
491
          of the date only as specified by ISO-8601. With this method, the
 
492
          time value is not included in the representation. Without
 
493
          argument, the date is computed in reference to the local
 
494
          time. With a boolean argument set to <code>true</code>, the date
 
495
          is computed in reference to the UTC time. If the argument
 
496
          is <code>false</code>, the local time is used.
 
497
        </p>
 
498
      </meth>
 
499
 
 
500
      <meth>
 
501
        <name>to-time</name>
 
502
        <retn>String</retn>
 
503
        <args>none|Boolean</args>
 
504
        <p>
 
505
          The <code>to-time</code> method returns a formatted representation
 
506
          of the time as returned by the <code>Time format</code>
 
507
          method. Without argument, the time is computed in reference to
 
508
          the local time. With a boolean argument set
 
509
          to <code>true</code>, the time is computed in reference to the
 
510
          UTC time. If the argument is <code>false</code>, the local time
 
511
          is used.
 
512
        </p>
 
513
      </meth>
 
514
 
 
515
      <meth>
 
516
        <name>add-years</name>
 
517
        <retn>none</retn>
 
518
        <args>Integer</args>
 
519
        <p>
 
520
          The <code>add-years</code> method add one or several years to the
 
521
          current date.
 
522
        </p>
 
523
      </meth>
 
524
 
 
525
      <meth>
 
526
        <name>add-months</name>
 
527
        <retn>none</retn>
 
528
        <args>Integer</args>
 
529
        <p>
 
530
          The <code>add-months</code> method add one or several months to the
 
531
          current date.
 
532
        </p>
 
533
      </meth>
485
534
    </methods>
486
535
  </object>
487
536
 
494
543
 
495
544
    <!-- synopsis -->
496
545
    <p>
497
 
    The <code>Options</code> class is a simple class used to define
498
 
    and retrieve user options. The object is constructed by
499
 
    specifying which option is valid and how it behaves. The
500
 
    arguments can be passed to the object for subsequent analysis. An
501
 
    option can be either a unique option or a string option. In this
502
 
    later case, multiple value for the same option can be accepted. In
503
 
    that case, the option is said to be a string vector option. An
504
 
    option can be also an option list. I that case, the option is
505
 
    defined with a set of valid string. A list option is associated
506
 
    with a boolean flag for each string defined with that option.
 
546
      The <code>Options</code> class is a simple class used to define
 
547
      and retrieve user options. The object is constructed by
 
548
      specifying which option is valid and how it behaves. The
 
549
      arguments can be passed to the object for subsequent analysis. An
 
550
      option can be either a unique option or a string option. In this
 
551
      later case, multiple value for the same option can be accepted. In
 
552
      that case, the option is said to be a string vector option. An
 
553
      option can be also an option list. I that case, the option is
 
554
      defined with a set of valid string. A list option is associated
 
555
      with a boolean flag for each string defined with that option.
507
556
    </p>
508
557
 
509
558
    <!-- predicate -->
516
565
 
517
566
    <!-- constructors -->
518
567
    <ctors>
519
 
     <ctor>
520
 
      <name>Options</name>
521
 
      <args>none</args>
522
 
      <p>
523
 
      The <code>Options</code> constructor creates a default option
524
 
      object without a user message.
525
 
      </p>
526
 
     </ctor>
 
568
      <ctor>
 
569
        <name>Options</name>
 
570
        <args>none</args>
 
571
        <p>
 
572
          The <code>Options</code> constructor creates a default option
 
573
          object without a user message.
 
574
        </p>
 
575
      </ctor>
527
576
 
528
 
     <ctor>
529
 
      <name>Options</name>
530
 
      <args>String</args>
531
 
      <p>
532
 
      The <code>Options</code> constructor creates an empty option object
533
 
      with a user message. The user message is used by the
534
 
      <code>usage</code> method.
535
 
      </p>
536
 
     </ctor>
 
577
      <ctor>
 
578
        <name>Options</name>
 
579
        <args>String</args>
 
580
        <p>
 
581
          The <code>Options</code> constructor creates an empty option object
 
582
          with a user message. The user message is used by the
 
583
          <code>usage</code> method.
 
584
        </p>
 
585
      </ctor>
537
586
    </ctors>
538
587
 
539
588
    <!-- methods -->
540
589
    <methods>
541
 
     <meth>
542
 
      <name>reset</name>
543
 
      <retn>none</retn>
544
 
      <args>none</args>
545
 
      <p>
546
 
      The <code>reset</code> method resets the object data structure
547
 
      but do not remove the option descriptors. After a reset operation, the
548
 
      class is ready to parse another string vector.
549
 
      </p>
550
 
     </meth>
551
 
 
552
 
     <meth>
553
 
      <name>usage</name>
554
 
      <retn>none</retn>
555
 
      <args>none</args>
556
 
      <p>
557
 
      The <code>usage</code> method prints a usage message with a user
558
 
      message and a one line description per option.
559
 
      removing all messages.
560
 
      </p>
561
 
     </meth>
562
 
 
563
 
     <meth>
564
 
      <name>parse</name>
565
 
      <retn>Vector</retn>
566
 
      <args>none</args>
567
 
      <p>
568
 
      The <code>parse</code> method parse a vector and fill the option
569
 
      data structure. The parse method is generally called with the
570
 
      interpreter argument vector.
571
 
      </p>
572
 
     </meth>
573
 
 
574
 
     <meth>
575
 
      <name>empty-p</name>
576
 
      <retn>Boolean</retn>
577
 
      <args>none</args>
578
 
      <p>
579
 
      The <code>empty-</code> predicate returns true if the argument
580
 
      vector is empty. The argument vector is filled wit the string
581
 
      that are not options during the parsing process.
582
 
      </p>
583
 
     </meth>
584
 
 
585
 
     <meth>
586
 
      <name>add-list-option</name>
587
 
      <retn>none</retn>
588
 
      <args>Character String String</args>
589
 
      <p>
590
 
      The <code>add-list-option</code> method creates a new list
591
 
      option. The list option is defined by the option character and
592
 
      the option string. The first argument is the option
593
 
      character. The second argument is the option list string. The
594
 
      third argument is the option message. During the parsing
595
 
      process, the list option have a string argument which must match
596
 
      one string associated with the option character.
597
 
      </p>
598
 
     </meth>
599
 
 
600
 
     <meth>
601
 
      <name>get-unique-option</name>
602
 
      <retn>Character String</retn>
603
 
      <args>none</args>
604
 
      <p>
605
 
      The <code>add-unique-option</code> method creates a new single
606
 
      option. The option is defined only by its character. The first
607
 
      argument is the option character. The second argument is the
608
 
      option message. During the parsing process, a unique option does
609
 
      not have an argument.
610
 
      </p>
611
 
     </meth>
612
 
 
613
 
     <meth>
614
 
      <name>add-string-option</name>
615
 
      <retn>none</retn>
616
 
      <args>Character String</args>
617
 
      <p>
618
 
      The <code>add-string-option</code> method creates a new string
619
 
      option. The option is defined only by its character. The first
620
 
      argument is the option character. The second argument is the
621
 
      option message. During the parsing process, a string option have
622
 
      a string argument.
623
 
      </p>
624
 
     </meth>
625
 
 
626
 
     <meth>
627
 
      <name>add-vector-option</name>
628
 
      <retn>Character String</retn>
629
 
      <args>none</args>
630
 
      <p>
631
 
      The <code>add-vector-option</code> method creates a new vector
632
 
      option. The option is defined only by its character. The first
633
 
      argument is the option character. The second argument is the
634
 
      option message. During the parsing process, a vector option have
635
 
      a string argument which is accumulated in a vector.
636
 
      </p>
637
 
     </meth>
638
 
  
639
 
     <meth>
640
 
      <name>set-user-message</name>
641
 
      <retn>none</retn>
642
 
      <args>String</args>
643
 
      <p>
644
 
      The <code>set-user-message</code> method sets the global
645
 
      option user message. The user message is used by the
646
 
      <code>usage</code> method.
647
 
      </p>
648
 
     </meth>
649
 
 
650
 
     <meth>
651
 
      <name>get-user-message</name>
652
 
      <retn>String</retn>
653
 
      <args>none</args>
654
 
      <p>
655
 
      The <code>get-user-message</code> method returns the global
656
 
      option user message. The user message is used by the
657
 
      <code>usage</code> method.
658
 
      </p>
659
 
     </meth>
660
 
 
661
 
     <meth>
662
 
      <name>get-unique-option</name>
663
 
      <retn>Boolean</retn>
664
 
      <args>Character</args>
665
 
      <p>
666
 
      The <code>get-unique-option</code> method returns the flag
667
 
      associated with an option. If the option has been detected
668
 
      during the parsing process, the method returns true. This method
669
 
      works also for string option or list option to indicate if the
670
 
      string has been set for that option. with a vector option, it is
671
 
      simpler to get the vector and check for the vector length. The
672
 
      first argument is the option character to use for testing.
673
 
      </p>
674
 
     </meth>
675
 
 
676
 
     <meth>
677
 
      <name>get-string-option</name>
678
 
      <retn>String</retn>
679
 
      <args>Character</args>
680
 
      <p>
681
 
      The <code>get-string-option</code> method returns the string
682
 
      associated with a string option. In order to make sure that a
683
 
      string option has been properly set during the parsing process,
684
 
      it is recommended to use the <code>get-unique-option</code>
685
 
      method. The first argument is the option character to use for
686
 
      the string retrieval.
687
 
      </p>
688
 
     </meth>
689
 
 
690
 
     <meth>
691
 
      <name>get-vector-option</name>
692
 
      <retn>Vector</retn>
693
 
      <args>Character</args>
694
 
      <p>
695
 
      The <code>get-vector-option</code> method returns the vector
696
 
      associated with a vector option. The first argument is the
697
 
      option character to use for the vector retrieval.
698
 
      </p>
699
 
     </meth>
700
 
 
701
 
     <meth>
702
 
      <name>get-vector-arguments</name>
703
 
      <retn>Vector</retn>
704
 
      <args>none</args>
705
 
      <p>
706
 
      The <code>get-vector-arguments</code> method returns the vector
707
 
      arguments built during the parsing process.
708
 
      </p>
709
 
     </meth>
 
590
      <meth>
 
591
        <name>reset</name>
 
592
        <retn>none</retn>
 
593
        <args>none</args>
 
594
        <p>
 
595
          The <code>reset</code> method resets the object data structure
 
596
          but do not remove the option descriptors. After a reset operation, the
 
597
          class is ready to parse another string vector.
 
598
        </p>
 
599
      </meth>
 
600
 
 
601
      <meth>
 
602
        <name>usage</name>
 
603
        <retn>none</retn>
 
604
        <args>none</args>
 
605
        <p>
 
606
          The <code>usage</code> method prints a usage message with a user
 
607
          message and a one line description per option.
 
608
          removing all messages.
 
609
        </p>
 
610
      </meth>
 
611
 
 
612
      <meth>
 
613
        <name>parse</name>
 
614
        <retn>Vector</retn>
 
615
        <args>none</args>
 
616
        <p>
 
617
          The <code>parse</code> method parse a vector and fill the option
 
618
          data structure. The parse method is generally called with the
 
619
          interpreter argument vector.
 
620
        </p>
 
621
      </meth>
 
622
 
 
623
      <meth>
 
624
        <name>empty-p</name>
 
625
        <retn>Boolean</retn>
 
626
        <args>none</args>
 
627
        <p>
 
628
          The <code>empty-</code> predicate returns true if the argument
 
629
          vector is empty. The argument vector is filled wit the string
 
630
          that are not options during the parsing process.
 
631
        </p>
 
632
      </meth>
 
633
 
 
634
      <meth>
 
635
        <name>add-list-option</name>
 
636
        <retn>none</retn>
 
637
        <args>Character String String</args>
 
638
        <p>
 
639
          The <code>add-list-option</code> method creates a new list
 
640
          option. The list option is defined by the option character and
 
641
          the option string. The first argument is the option
 
642
          character. The second argument is the option list string. The
 
643
          third argument is the option message. During the parsing
 
644
          process, the list option have a string argument which must match
 
645
          one string associated with the option character.
 
646
        </p>
 
647
      </meth>
 
648
 
 
649
      <meth>
 
650
        <name>get-unique-option</name>
 
651
        <retn>Character String</retn>
 
652
        <args>none</args>
 
653
        <p>
 
654
          The <code>add-unique-option</code> method creates a new single
 
655
          option. The option is defined only by its character. The first
 
656
          argument is the option character. The second argument is the
 
657
          option message. During the parsing process, a unique option does
 
658
          not have an argument.
 
659
        </p>
 
660
      </meth>
 
661
 
 
662
      <meth>
 
663
        <name>add-string-option</name>
 
664
        <retn>none</retn>
 
665
        <args>Character String</args>
 
666
        <p>
 
667
          The <code>add-string-option</code> method creates a new string
 
668
          option. The option is defined only by its character. The first
 
669
          argument is the option character. The second argument is the
 
670
          option message. During the parsing process, a string option have
 
671
          a string argument.
 
672
        </p>
 
673
      </meth>
 
674
 
 
675
      <meth>
 
676
        <name>add-vector-option</name>
 
677
        <retn>Character String</retn>
 
678
        <args>none</args>
 
679
        <p>
 
680
          The <code>add-vector-option</code> method creates a new vector
 
681
          option. The option is defined only by its character. The first
 
682
          argument is the option character. The second argument is the
 
683
          option message. During the parsing process, a vector option have
 
684
          a string argument which is accumulated in a vector.
 
685
        </p>
 
686
      </meth>
 
687
      
 
688
      <meth>
 
689
        <name>set-user-message</name>
 
690
        <retn>none</retn>
 
691
        <args>String</args>
 
692
        <p>
 
693
          The <code>set-user-message</code> method sets the global
 
694
          option user message. The user message is used by the
 
695
          <code>usage</code> method.
 
696
        </p>
 
697
      </meth>
 
698
 
 
699
      <meth>
 
700
        <name>get-user-message</name>
 
701
        <retn>String</retn>
 
702
        <args>none</args>
 
703
        <p>
 
704
          The <code>get-user-message</code> method returns the global
 
705
          option user message. The user message is used by the
 
706
          <code>usage</code> method.
 
707
        </p>
 
708
      </meth>
 
709
 
 
710
      <meth>
 
711
        <name>get-unique-option</name>
 
712
        <retn>Boolean</retn>
 
713
        <args>Character</args>
 
714
        <p>
 
715
          The <code>get-unique-option</code> method returns the flag
 
716
          associated with an option. If the option has been detected
 
717
          during the parsing process, the method returns true. This method
 
718
          works also for string option or list option to indicate if the
 
719
          string has been set for that option. with a vector option, it is
 
720
          simpler to get the vector and check for the vector length. The
 
721
          first argument is the option character to use for testing.
 
722
        </p>
 
723
      </meth>
 
724
 
 
725
      <meth>
 
726
        <name>get-string-option</name>
 
727
        <retn>String</retn>
 
728
        <args>Character</args>
 
729
        <p>
 
730
          The <code>get-string-option</code> method returns the string
 
731
          associated with a string option. In order to make sure that a
 
732
          string option has been properly set during the parsing process,
 
733
          it is recommended to use the <code>get-unique-option</code>
 
734
          method. The first argument is the option character to use for
 
735
          the string retrieval.
 
736
        </p>
 
737
      </meth>
 
738
 
 
739
      <meth>
 
740
        <name>get-vector-option</name>
 
741
        <retn>Vector</retn>
 
742
        <args>Character</args>
 
743
        <p>
 
744
          The <code>get-vector-option</code> method returns the vector
 
745
          associated with a vector option. The first argument is the
 
746
          option character to use for the vector retrieval.
 
747
        </p>
 
748
      </meth>
 
749
 
 
750
      <meth>
 
751
        <name>get-vector-arguments</name>
 
752
        <retn>Vector</retn>
 
753
        <args>none</args>
 
754
        <p>
 
755
          The <code>get-vector-arguments</code> method returns the vector
 
756
          arguments built during the parsing process.
 
757
        </p>
 
758
      </meth>
710
759
    </methods>
711
760
  </object>
712
761
 
715
764
  <!-- =================================================================== -->
716
765
 
717
766
  <functions>
718
 
   <func nameset="afnix:sys">
719
 
    <name>exit</name>
720
 
    <retn>none</retn>
721
 
    <args>Integer</args>
722
 
    <p>
723
 
    The <code>exit</code> function terminates the executing program
724
 
    with the exit code specified as the argument.
725
 
    </p>
726
 
   </func>
727
 
 
728
 
   <func nameset="afnix:sys">
729
 
    <name>sleep</name>
730
 
    <retn>none</retn>
731
 
    <args>Integer</args>
732
 
    <p>
733
 
    The <code>sleep</code> function pause the specific thread for a
734
 
    certain time. The time argument is expressed in milliseconds. This
735
 
    function returns nil.
736
 
    </p>
737
 
   </func>
738
 
 
739
 
   <func nameset="afnix:sys">
740
 
    <name>get-option</name>
741
 
    <retn>String</retn>
742
 
    <args>Character</args>
743
 
    <p>
744
 
    The <code>get-option</code> function returns a formatted string
745
 
    equivalent to the system option as specified by the character
746
 
    argument.
747
 
    </p>
748
 
   </func>
749
 
 
750
 
   <func nameset="afnix:sys">
751
 
    <name>get-random</name>
752
 
    <retn>Integer</retn>
753
 
    <args>none|Integer</args>
754
 
    <p>
755
 
    The <code>get-random</code> function returns a random integer
756
 
    number. Without argument, the integer range is machine
757
 
    dependent. With one integer argument, the resulting integer number
758
 
    is less than the specified maximum bound.
759
 
    </p>
760
 
   </func>
761
 
 
762
 
   <func nameset="afnix:sys">
763
 
    <name>get-random-real</name>
764
 
    <retn>Real</retn>
765
 
    <args>none</args>
766
 
    <p>
767
 
    The <code>get-random-real</code> function returns a random real
768
 
    number between 0.0 and 1.0.
769
 
    </p>
770
 
   </func>
771
 
 
772
 
   <func nameset="afnix:sys">
773
 
    <name>get-unique-id</name>
774
 
    <retn>Integer</retn>
775
 
    <args>none</args>
776
 
    <p>
777
 
    The <code>get-unique-id</code> function returns an unique integer
778
 
    number. The returned number is unique across the session.
779
 
    </p>
780
 
   </func>
781
 
 
782
 
   <func nameset="afnix:sys">
783
 
    <name>get-pid</name>
784
 
    <retn>Integer</retn>
785
 
    <args>none</args>
786
 
    <p>
787
 
    The <code>get-pid</code> function returns the process identifier
788
 
    (pid). The returned value is a positive integer.
789
 
    </p>
790
 
   </func>
791
 
 
792
 
   <func nameset="afnix:sys">
793
 
    <name>get-env</name>
794
 
    <retn>String</retn>
795
 
    <args>String</args>
796
 
    <p>
797
 
    The <code>get-env</code> function returns the environment variable
798
 
    associated with the string argument. If the environment does not
799
 
    exist an exception is raised.
800
 
    </p>
801
 
   </func>
802
 
 
803
 
   <func nameset="afnix:sys">
804
 
    <name>get-host-name</name>
805
 
    <retn>String</retn>
806
 
    <args>none</args>
807
 
    <p>
808
 
    The <code>get-host-name</code> function returns the host name. The
809
 
    host name can be either a simple name or a canonical name with its
810
 
    domain, depending on the system configuration.
811
 
    </p>
812
 
   </func>
813
 
 
814
 
   <func nameset="afnix:sys">
815
 
    <name>get-user-name</name>
816
 
    <retn>String</retn>
817
 
    <args>none</args>
818
 
    <p>
819
 
    The <code>get-user-name</code> function returns the current user
820
 
    name.
821
 
    </p>
822
 
   </func>
 
767
    <func nameset="afnix:sys">
 
768
      <name>exit</name>
 
769
      <retn>none</retn>
 
770
      <args>Integer</args>
 
771
      <p>
 
772
        The <code>exit</code> function terminates the executing program
 
773
        with the exit code specified as the argument.
 
774
      </p>
 
775
    </func>
 
776
 
 
777
    <func nameset="afnix:sys">
 
778
      <name>sleep</name>
 
779
      <retn>none</retn>
 
780
      <args>Integer</args>
 
781
      <p>
 
782
        The <code>sleep</code> function pause the specific thread for a
 
783
        certain time. The time argument is expressed in milliseconds. This
 
784
        function returns nil.
 
785
      </p>
 
786
    </func>
 
787
 
 
788
    <func nameset="afnix:sys">
 
789
      <name>get-option</name>
 
790
      <retn>String</retn>
 
791
      <args>Character</args>
 
792
      <p>
 
793
        The <code>get-option</code> function returns a formatted string
 
794
        equivalent to the system option as specified by the character
 
795
        argument.
 
796
      </p>
 
797
    </func>
 
798
 
 
799
    <func nameset="afnix:sys">
 
800
      <name>get-unique-id</name>
 
801
      <retn>Integer</retn>
 
802
      <args>none</args>
 
803
      <p>
 
804
        The <code>get-unique-id</code> function returns an unique integer
 
805
        number. The returned number is unique across the session.
 
806
      </p>
 
807
    </func>
 
808
 
 
809
    <func nameset="afnix:sys">
 
810
      <name>get-pid</name>
 
811
      <retn>Integer</retn>
 
812
      <args>none</args>
 
813
      <p>
 
814
        The <code>get-pid</code> function returns the process identifier
 
815
        (pid). The returned value is a positive integer.
 
816
      </p>
 
817
    </func>
 
818
 
 
819
    <func nameset="afnix:sys">
 
820
      <name>get-env</name>
 
821
      <retn>String</retn>
 
822
      <args>String</args>
 
823
      <p>
 
824
        The <code>get-env</code> function returns the environment variable
 
825
        associated with the string argument. If the environment does not
 
826
        exist an exception is raised.
 
827
      </p>
 
828
    </func>
 
829
 
 
830
    <func nameset="afnix:sys">
 
831
      <name>get-host-name</name>
 
832
      <retn>String</retn>
 
833
      <args>none</args>
 
834
      <p>
 
835
        The <code>get-host-name</code> function returns the host name. The
 
836
        host name can be either a simple name or a canonical name with its
 
837
        domain, depending on the system configuration.
 
838
      </p>
 
839
    </func>
 
840
 
 
841
    <func nameset="afnix:sys">
 
842
      <name>get-user-name</name>
 
843
      <retn>String</retn>
 
844
      <args>none</args>
 
845
      <p>
 
846
        The <code>get-user-name</code> function returns the current user
 
847
        name.
 
848
      </p>
 
849
    </func>
823
850
  </functions>
824
851
</appendix>