4 <title>io - core reference
</title>
5 <META HTTP-EQUIV=
"EXPIRES" CONTENT=
0>
10 text-decoration : none;
14 font-family: 'Serif', 'Helvetica Neue', 'Helvetica', 'Sans';
18 padding:
0em
0em
0em
3.1em;
33 font-family: 'Helvetica-Bold', 'Helvetica';
47 text-decoration: none;
50 vertical-align:
0.000000em;
56 font-family: 'Courier', 'Courier';
70 text-decoration: none;
73 vertical-align:
0.000000em;
78 font-family: 'Helvetica', 'Helvetica';
88 margin-top:
0.000000em;
89 padding-bottom:
7.000000pt;
90 padding-top:
21.000000pt;
92 text-decoration: none;
95 vertical-align:
0.000000em;
100 font-family: 'Helvetica-Bold', 'Helvetica';
103 font-variant: normal;
114 text-decoration: none;
116 text-transform: none;
117 vertical-align:
0.000000em;
122 font-family: 'Times-Italic', 'Times';
125 font-variant: normal;
129 margin-bottom:
0.000000em;
131 margin-right:
0.00em;
132 margin-top:
0.000000em;
133 padding-bottom:
0.000000em;
134 padding-top:
0.000000em;
136 text-decoration: none;
138 text-transform: none;
139 vertical-align:
0.000000em;
147 <h1>Io Core Reference Manual
</h1>
148 <div class=Version
>Version
20080120</div>
151 <a href=#Addon
style=
"color: #555;">Addon
</a><br>
152 <a href=#Block
style=
"color: #555;">Block
</a><br>
153 <a href=#CFunction
style=
"color: #555;">CFunction
</a><br>
154 <a href=#Call
style=
"color: #555;">Call
</a><br>
155 <a href=#Collector
style=
"color: #555;">Collector
</a><br>
156 <a href=#Compiler
style=
"color: #555;">Compiler
</a><br>
157 <a href=#Coroutine
style=
"color: #555;">Coroutine
</a><br>
158 <a href=#Date
style=
"color: #555;">Date
</a><br>
159 <a href=#Debugger
style=
"color: #555;">Debugger
</a><br>
160 <a href=#Directory
style=
"color: #555;">Directory
</a><br>
161 <a href=#Duration
style=
"color: #555;">Duration
</a><br>
162 <a href=#DynLib
style=
"color: #555;">DynLib
</a><br>
163 <a href=#File
style=
"color: #555;">File
</a><br>
164 <a href=#ImmutableSequence
style=
"color: #555;">ImmutableSequence
</a><br>
165 <a href=#Importer
style=
"color: #555;">Importer
</a><br>
166 <a href=#List
style=
"color: #555;">List
</a><br>
167 <a href=#Map
style=
"color: #555;">Map
</a><br>
168 <a href=#Message
style=
"color: #555;">Message
</a><br>
169 <a href=#MutableSequence
style=
"color: #555;">MutableSequence
</a><br>
170 <a href=#Number
style=
"color: #555;">Number
</a><br>
171 <a href=#Object
style=
"color: #555;">Object
</a><br>
172 <a href=#Path
style=
"color: #555;">Path
</a><br>
173 <a href=#Sandbox
style=
"color: #555;">Sandbox
</a><br>
174 <a href=#Scheduler
style=
"color: #555;">Scheduler
</a><br>
175 <a href=#Sequence
style=
"color: #555;">Sequence
</a><br>
176 <a href=#State
style=
"color: #555;">State
</a><br>
177 <a href=#System
style=
"color: #555;">System
</a><br>
178 <a href=#Tag
style=
"color: #555;">Tag
</a><br>
179 <a href=#Token
style=
"color: #555;">Token
</a><br>
180 <a href=#UnitTest
style=
"color: #555;">UnitTest
</a><br>
181 <a href=#WeakLink
style=
"color: #555;">WeakLink
</a><br>
182 <a href=#nil
style=
"color: #555;">nil
</a><br>
183 <a href=#true
style=
"color: #555;">true
</a><br>
185 <h2><a name=Addon
><font color=black
>Addon
</font></a></h2>
186 <ul style=
"width:40em">
187 <b><font color=#
000>Protos:
</font></b> Object
189 <div style=
"width:40em; margin-left:2em">
190 <b><a href=#Addon-addonFor(aName)
>addonFor(aName)
</a></b><br>
191 <b><a href=#Addon-addonPath
>addonPath
</a></b><br>
192 <b><a href=#Addon-addonProtos
>addonProtos
</a></b><br>
193 <b><a href=#Addon-addons
>addons
</a></b><br>
194 <b><a href=#Addon-appendSearchPath(aSequence)
>appendSearchPath(aSequence)
</a></b><br>
195 <b><a href=#Addon-dependencies
>dependencies
</a></b><br>
196 <b><a href=#Addon-dllName
>dllName
</a></b><br>
197 <b><a href=#Addon-dllPath
>dllPath
</a></b><br>
198 <b><a href=#Addon-dllSuffix
>dllSuffix
</a></b><br>
199 <b><a href=#Addon-exists
>exists
</a></b><br>
200 <b><a href=#Addon-hasAddonNamed(aName)
>hasAddonNamed(aName)
</a></b><br>
201 <b><a href=#Addon-ioFiles
>ioFiles
</a></b><br>
202 <b><a href=#Addon-load
>load
</a></b><br>
203 <b><a href=#Addon-loadAddonNamed(aName)
>loadAddonNamed(aName)
</a></b><br>
204 <b><a href=#Addon-loadDependencies
>loadDependencies
</a></b><br>
205 <b><a href=#Addon-name
>name
</a></b><br>
206 <b><a href=#Addon-platform
>platform
</a></b><br>
207 <b><a href=#Addon-rootPath
>rootPath
</a></b><br>
208 <b><a href=#Addon-searchPaths
>searchPaths
</a></b><br>
209 <b><a href=#Addon-setName(aSequence)
>setName(aSequence)
</a></b><br>
210 <b><a href=#Addon-setRootPath(aSequence)
>setRootPath(aSequence)
</a></b><br>
211 <b><a href=#Addon-sourcePath
>sourcePath
</a></b><br>
216 <b><a name=Addon-addonFor(aName)
><font color=black
>addonFor(aName)
</font></a></b><p>
217 <div style=
"width:40em; margin-left:2em">
218 Returns the Addon with the given name if it can be found or nil otherwise.
223 <b><a name=Addon-addonPath
><font color=black
>addonPath
</font></a></b><p>
224 <div style=
"width:40em; margin-left:2em">
225 Implemented as Path with(rootPath, name).
230 <b><a name=Addon-addonProtos
><font color=black
>addonProtos
</font></a></b><p>
231 <div style=
"width:40em; margin-left:2em">
232 Returns names of protos defined in the addon from the addon's protos file.
237 <b><a name=Addon-addons
><font color=black
>addons
</font></a></b><p>
238 <div style=
"width:40em; margin-left:2em">
239 Looks for all addons which can be found and returns them as a list of Addon objects. Caches the result the first time it is called.
244 <b><a name=Addon-appendSearchPath(aSequence)
><font color=black
>appendSearchPath(aSequence)
</font></a></b><p>
245 <div style=
"width:40em; margin-left:2em">
246 Appends the argument to the list of search paths.
251 <b><a name=Addon-dependencies
><font color=black
>dependencies
</font></a></b><p>
252 <div style=
"width:40em; margin-left:2em">
253 Returns the list of dependencies from the addon's depends file.
258 <b><a name=Addon-dllName
><font color=black
>dllName
</font></a></b><p>
259 <div style=
"width:40em; margin-left:2em">
260 Return the name of the dll for the addon.
265 <b><a name=Addon-dllPath
><font color=black
>dllPath
</font></a></b><p>
266 <div style=
"width:40em; margin-left:2em">
267 Returns the path to the dll for the addon. Note: not all addons have dlls - some just contain io files.
272 <b><a name=Addon-dllSuffix
><font color=black
>dllSuffix
</font></a></b><p>
273 <div style=
"width:40em; margin-left:2em">
274 Returns the platform specific dll suffix.
279 <b><a name=Addon-exists
><font color=black
>exists
</font></a></b><p>
280 <div style=
"width:40em; margin-left:2em">
281 Returns true if the addonPath exists, false otherwise.
286 <b><a name=Addon-hasAddonNamed(aName)
><font color=black
>hasAddonNamed(aName)
</font></a></b><p>
287 <div style=
"width:40em; margin-left:2em">
288 Returns true if the named addon can be found, false otherwise.
293 <b><a name=Addon-ioFiles
><font color=black
>ioFiles
</font></a></b><p>
294 <div style=
"width:40em; margin-left:2em">
295 Return list of io File objects for the io files in the io folder of the addon.
300 <b><a name=Addon-load
><font color=black
>load
</font></a></b><p>
301 <div style=
"width:40em; margin-left:2em">
307 <b><a name=Addon-loadAddonNamed(aName)
><font color=black
>loadAddonNamed(aName)
</font></a></b><p>
308 <div style=
"width:40em; margin-left:2em">
309 Loads the Addon with the given name if it can be found or nil otherwise.
314 <b><a name=Addon-loadDependencies
><font color=black
>loadDependencies
</font></a></b><p>
315 <div style=
"width:40em; margin-left:2em">
316 Loads the addon's dependencies. Called from the load method.
321 <b><a name=Addon-name
><font color=black
>name
</font></a></b><p>
322 <div style=
"width:40em; margin-left:2em">
323 Returns the name of the addon.
328 <b><a name=Addon-platform
><font color=black
>platform
</font></a></b><p>
329 <div style=
"width:40em; margin-left:2em">
330 Implemented as method(System platform split at(
0) asLowercase).
335 <b><a name=Addon-rootPath
><font color=black
>rootPath
</font></a></b><p>
336 <div style=
"width:40em; margin-left:2em">
337 Returns the rootPath of the addon's folder.
342 <b><a name=Addon-searchPaths
><font color=black
>searchPaths
</font></a></b><p>
343 <div style=
"width:40em; margin-left:2em">
344 Returns the list of paths to search for addons.
349 <b><a name=Addon-setName(aSequence)
><font color=black
>setName(aSequence)
</font></a></b><p>
350 <div style=
"width:40em; margin-left:2em">
351 Sets the name of the addon. Returns self.
356 <b><a name=Addon-setRootPath(aSequence)
><font color=black
>setRootPath(aSequence)
</font></a></b><p>
357 <div style=
"width:40em; margin-left:2em">
358 Sets rootPath of the addon's folder. Returns self.
363 <b><a name=Addon-sourcePath
><font color=black
>sourcePath
</font></a></b><p>
364 <div style=
"width:40em; margin-left:2em">
365 Returns the path of the source folder for the addon.
374 <h2><a name=Block
><font color=black
>Block
</font></a></h2>
375 <ul style=
"width:40em">
376 <b><font color=#
000>Protos:
</font></b> Object
378 Blocks are anonymous functions (messages with their own locals object).
379 They are typically used to represent object methods.
383 <div style=
"width:40em; margin-left:2em">
384 <b><a href=#Block-argumentNames
>argumentNames
</a></b><br>
385 <b><a href=#Block-asSimpleString
>asSimpleString
</a></b><br>
386 <b><a href=#Block-asString
>asString
</a></b><br>
387 <b><a href=#Block-call(arg0, arg1, ...)
>call(arg0, arg1, ...)
</a></b><br>
388 <b><a href=#Block-code
>code
</a></b><br>
389 <b><a href=#Block-justSerialized(stream)
>justSerialized(stream)
</a></b><br>
390 <b><a href=#Block-message
>message
</a></b><br>
391 <b><a href=#Block-passStops
>passStops
</a></b><br>
392 <b><a href=#Block-performOn(anObject, optionalLocals, optionalMessage, optionalSlotContext)
>performOn(anObject, optionalLocals, optionalMessage, optionalSlotContext)
</a></b><br>
393 <b><a href=#Block-print
>print
</a></b><br>
394 <b><a href=#Block-scope
>scope
</a></b><br>
395 <b><a href=#Block-setArgumentNames(aListOfStrings)
>setArgumentNames(aListOfStrings)
</a></b><br>
396 <b><a href=#Block-setCode(aString)
>setCode(aString)
</a></b><br>
397 <b><a href=#Block-setMessage(aMessage)
>setMessage(aMessage)
</a></b><br>
398 <b><a href=#Block-setPassStops(aBool)
>setPassStops(aBool)
</a></b><br>
399 <b><a href=#Block-setScope(anObjectOrNil)
>setScope(anObjectOrNil)
</a></b><br>
404 <b><a name=Block-argumentNames
><font color=black
>argumentNames
</font></a></b><p>
405 <div style=
"width:40em; margin-left:2em">
406 Returns a List of strings containing the argument names of the receiver.
411 <b><a name=Block-asSimpleString
><font color=black
>asSimpleString
</font></a></b><p>
412 <div style=
"width:40em; margin-left:2em">
413 Returns a short description of the receiver.
418 <b><a name=Block-asString
><font color=black
>asString
</font></a></b><p>
419 <div style=
"width:40em; margin-left:2em">
420 Returns a full description of the receiver with decompiled code.
425 <b><a name=Block-call(arg0, arg1, ...)
><font color=black
>call(arg0, arg1, ...)
</font></a></b><p>
426 <div style=
"width:40em; margin-left:2em">
427 Activates the receiver with the provided arguments.
432 <b><a name=Block-code
><font color=black
>code
</font></a></b><p>
433 <div style=
"width:40em; margin-left:2em">
434 Returns a string containing the decompiled code of the receiver.
439 <b><a name=Block-justSerialized(stream)
><font color=black
>justSerialized(stream)
</font></a></b><p>
440 <div style=
"width:40em; margin-left:2em">
441 Write's the receivers code into the stream.
446 <b><a name=Block-message
><font color=black
>message
</font></a></b><p>
447 <div style=
"width:40em; margin-left:2em">
448 Returns the root message of the receiver.
453 <b><a name=Block-passStops
><font color=black
>passStops
</font></a></b><p>
454 <div style=
"width:40em; margin-left:2em">
455 Returns whether or not the receiver passes return/continue/break to caller.
460 <b><a name=Block-performOn(anObject, optionalLocals, optionalMessage, optionalSlotContext)
><font color=black
>performOn(anObject, optionalLocals, optionalMessage, optionalSlotContext)
</font></a></b><p>
461 <div style=
"width:40em; margin-left:2em">
462 Activates the receiver in the target context of anObject.
468 <b><a name=Block-print
><font color=black
>print
</font></a></b><p>
469 <div style=
"width:40em; margin-left:2em">
470 prints an Io source code representation of the block/method
475 <b><a name=Block-scope
><font color=black
>scope
</font></a></b><p>
476 <div style=
"width:40em; margin-left:2em">
477 Returns the scope used when the block is activated or
478 Nil if the target of the message is the scope.
483 <b><a name=Block-setArgumentNames(aListOfStrings)
><font color=black
>setArgumentNames(aListOfStrings)
</font></a></b><p>
484 <div style=
"width:40em; margin-left:2em">
485 Sets the receiver's argument names to those specified in
486 aListOfStrings. Returns self.
491 <b><a name=Block-setCode(aString)
><font color=black
>setCode(aString)
</font></a></b><p>
492 <div style=
"width:40em; margin-left:2em">
493 Set's the reciever's message to a compiled version of aString. Returns self
498 <b><a name=Block-setMessage(aMessage)
><font color=black
>setMessage(aMessage)
</font></a></b><p>
499 <div style=
"width:40em; margin-left:2em">
500 Sets the root message of the receiver to aMessage.
505 <b><a name=Block-setPassStops(aBool)
><font color=black
>setPassStops(aBool)
</font></a></b><p>
506 <div style=
"width:40em; margin-left:2em">
507 Sets whether the receiver passes return/continue/break to caller.
512 <b><a name=Block-setScope(anObjectOrNil)
><font color=black
>setScope(anObjectOrNil)
</font></a></b><p>
513 <div style=
"width:40em; margin-left:2em">
514 If argument is an object, when the block is activated,
515 it will set the proto and self slots of it's locals to the specified
516 object. If Nil, it will set them to the target of the message.
525 <h2><a name=CFunction
><font color=black
>CFunction
</font></a></h2>
526 <ul style=
"width:40em">
527 <b><font color=#
000>Protos:
</font></b> Object
529 A container for a pointer to a C function binding.
530 CFunction's can only be defined from the C side and act
531 like blocks in that when placed in a slot, are called when the
532 slot is activated. The for, if, while and clone methods of the Lobby
533 are examples of CFunctions. CFunctions are useful for implementing
534 methods that require the speed of C or binding to a C library.
538 <div style=
"width:40em; margin-left:2em">
539 <b><a href=#CFunction-==(anObject)
>==(anObject)
</a></b><br>
540 <b><a href=#CFunction-asSimpleString
>asSimpleString
</a></b><br>
541 <b><a href=#CFunction-asString
>asString
</a></b><br>
542 <b><a href=#CFunction-id
>id
</a></b><br>
543 <b><a href=#CFunction-name
>name
</a></b><br>
544 <b><a href=#CFunction-performOn(target, blockLocals, optionalMessage, optionalContext)
>performOn(target, blockLocals, optionalMessage, optionalContext)
</a></b><br>
545 <b><a href=#CFunction-type
>type
</a></b><br>
546 <b><a href=#CFunction-typeName
>typeName
</a></b><br>
547 <b><a href=#CFunction-uniqueName
>uniqueName
</a></b><br>
552 <b><a name=CFunction-==(anObject)
><font color=black
>==(anObject)
</font></a></b><p>
553 <div style=
"width:40em; margin-left:2em">
554 Returns self if the argument is a CFunction with the same internal C function pointer.
559 <b><a name=CFunction-asSimpleString
><font color=black
>asSimpleString
</font></a></b><p>
560 <div style=
"width:40em; margin-left:2em">
561 Returns the CFunction name.
566 <b><a name=CFunction-asString
><font color=black
>asString
</font></a></b><p>
567 <div style=
"width:40em; margin-left:2em">
568 Same as asSimpleString.
573 <b><a name=CFunction-id
><font color=black
>id
</font></a></b><p>
574 <div style=
"width:40em; margin-left:2em">
575 Returns a number containing a unique id for the receiver's internal C function.
580 <b><a name=CFunction-name
><font color=black
>name
</font></a></b><p>
581 <div style=
"width:40em; margin-left:2em">
582 Returns the CFunction name in the form CFunction_Pointer.
")
587 <b><a name=CFunction-performOn(target, blockLocals, optionalMessage, optionalContext)><font color=black>performOn(target, blockLocals, optionalMessage, optionalContext)</font></a></b><p>
588 <div style="width:
40em; margin-left:
2em
">
589 Activates the CFunctions with the supplied settings.
594 <b><a name=CFunction-type><font color=black>type</font></a></b><p>
595 <div style="width:
40em; margin-left:
2em
">
601 <b><a name=CFunction-typeName><font color=black>typeName</font></a></b><p>
602 <div style="width:
40em; margin-left:
2em
">
603 Returns the owning type of the CFunction or nil if the CFunction can be called on any object.
608 <b><a name=CFunction-uniqueName><font color=black>uniqueName</font></a></b><p>
609 <div style="width:
40em; margin-left:
2em
">
610 Returns the name given to the CFunction.
619 <h2><a name=Call><font color=black>Call</font></a></h2>
620 <ul style="width:
40em
">
621 <b><font color=#000>Protos:</font></b> Object
623 Call stores slots related to activation.
627 <div style="width:
40em; margin-left:
2em
">
628 <b><a href=#Call-activated >activated</a></b><br>
629 <b><a href=#Call-argAt(argNumber) >argAt(argNumber)</a></b><br>
630 <b><a href=#Call-description >description </a></b><br>
631 <b><a href=#Call-evalArgAt(argNumber) >evalArgAt(argNumber)</a></b><br>
632 <b><a href=#Call-message >message</a></b><br>
633 <b><a href=#Call-sender >sender</a></b><br>
634 <b><a href=#Call-slotContext >slotContext</a></b><br>
635 <b><a href=#Call-target >target</a></b><br>
640 <b><a name=Call-activated><font color=black>activated</font></a></b><p>
641 <div style="width:
40em; margin-left:
2em
">
642 Returns the coroutine in which the message was sent.
647 <b><a name=Call-argAt(argNumber)><font color=black>argAt(argNumber)</font></a></b><p>
648 <div style="width:
40em; margin-left:
2em
">
649 Returns the message's argNumber arg. Shorthand for same as call message argAt(argNumber).
654 <b><a name=Call-description ><font color=black>description </font></a></b><p>
655 <div style="width:
40em; margin-left:
2em
">
656 Returns a description of the receiver as a String.
661 <b><a name=Call-evalArgAt(argNumber)><font color=black>evalArgAt(argNumber)</font></a></b><p>
662 <div style="width:
40em; margin-left:
2em
">
663 Evaluates the specified argument of the Call's message in the context of it's sender.
668 <b><a name=Call-message><font color=black>message</font></a></b><p>
669 <div style="width:
40em; margin-left:
2em
">
670 Returns the message value.
675 <b><a name=Call-sender><font color=black>sender</font></a></b><p>
676 <div style="width:
40em; margin-left:
2em
">
677 Returns the sender value.
682 <b><a name=Call-slotContext><font color=black>slotContext</font></a></b><p>
683 <div style="width:
40em; margin-left:
2em
">
684 Returns the slotContext value.
689 <b><a name=Call-target><font color=black>target</font></a></b><p>
690 <div style="width:
40em; margin-left:
2em
">
691 Returns the target value.
700 <h2><a name=Collector><font color=black>Collector</font></a></h2>
701 <ul style="width:
40em
">
702 <b><font color=#000>Protos:</font></b> Object
704 Contains methods related to Io's garbage collector.
705 Io currently uses a incremental, non-moving, generational
706 collector based on the tri-color (black/gray/white)
707 algorithm with a write-barrier.
709 Every N number of object allocs, the collector will walk
710 some of the objects marked as gray, marking their connected
711 white objects as gray and turning themselves black.
712 Every M allocs, it will pause for a sweep where it makes sure
713 all grays are marked black and io_frees all whites.
715 If the sweepsPerGeneration is set to zero, it will immediately mark
716 all blacks as white again and mark the root objects as gray. Otherwise,
717 it will wait until the sweepsPerGeneration count is reached to do this.
718 By adjusting the allocsPerSweep and sweepsPerGeneration appropriately, the
719 collector can be tuned efficiently for various usage cases.
721 Generally, the more objects in your heap, the larger you'll want this number.
725 <div style="width:
40em; margin-left:
2em
">
726 <b><a href=#Collector-allObjects >allObjects</a></b><br>
727 <b><a href=#Collector-allocatedStep >allocatedStep</a></b><br>
728 <b><a href=#Collector-allocsPerMark >allocsPerMark</a></b><br>
729 <b><a href=#Collector-collect >collect</a></b><br>
730 <b><a href=#Collector-setAllocatedStep(aNumber) >setAllocatedStep(aNumber)</a></b><br>
731 <b><a href=#Collector-setDebug(aBool) >setDebug(aBool)</a></b><br>
732 <b><a href=#Collector-setMarksPerAlloc(aNumber) >setMarksPerAlloc(aNumber)</a></b><br>
733 <b><a href=#Collector-timeUsed >timeUsed</a></b><br>
738 <b><a name=Collector-allObjects><font color=black>allObjects</font></a></b><p>
739 <div style="width:
40em; margin-left:
2em
">
740 Returns a List containing all objects known to the collector.
745 <b><a name=Collector-allocatedStep><font color=black>allocatedStep</font></a></b><p>
746 <div style="width:
40em; margin-left:
2em
">
747 Return the allocation step value as a Number.
752 <b><a name=Collector-allocsPerMark><font color=black>allocsPerMark</font></a></b><p>
753 <div style="width:
40em; margin-left:
2em
">
754 Return the number of allocations per collector mark pass.
759 <b><a name=Collector-collect><font color=black>collect</font></a></b><p>
760 <div style="width:
40em; margin-left:
2em
">
761 Runs garbage collector. Returns the number of items collected.
766 <b><a name=Collector-setAllocatedStep(aNumber)><font color=black>setAllocatedStep(aNumber)</font></a></b><p>
767 <div style="width:
40em; margin-left:
2em
">
768 Sets the allocatedStep (can have a fractional component,
769 but must be larger than 1). A collector sweep is forced when the
770 number of allocated objects exceeds the allocatedSweepLevel.
771 After a sweep, the allocatedSweepLevel is set to the allocated
772 object count times the allocatedStep. Returns self.
777 <b><a name=Collector-setDebug(aBool)><font color=black>setDebug(aBool)</font></a></b><p>
778 <div style="width:
40em; margin-left:
2em
">
779 Turns on/off printing of collector debugging messages. Returns self.
784 <b><a name=Collector-setMarksPerAlloc(aNumber)><font color=black>setMarksPerAlloc(aNumber)</font></a></b><p>
785 <div style="width:
40em; margin-left:
2em
">
786 Sets the number of incremental collector marks per object
787 allocation (can be fractional). Returns self.
792 <b><a name=Collector-timeUsed><font color=black>timeUsed</font></a></b><p>
793 <div style="width:
40em; margin-left:
2em
">
794 Return the time used so far by the collector in seconds.
803 <h2><a name=Compiler><font color=black>Compiler</font></a></h2>
804 <ul style="width:
40em
">
805 <b><font color=#000>Protos:</font></b> Object
807 Contains methods related to the compiling code.
811 <div style="width:
40em; margin-left:
2em
">
812 <b><a href=#Compiler-messageForString(aString, optionalLabelString) >messageForString(aString, optionalLabelString)</a></b><br>
813 <b><a href=#Compiler-messageForTokens(aList) >messageForTokens(aList)</a></b><br>
814 <b><a href=#Compiler-tokensForString(aString) >tokensForString(aString)</a></b><br>
819 <b><a name=Compiler-messageForString(aString, optionalLabelString)><font color=black>messageForString(aString, optionalLabelString)</font></a></b><p>
820 <div style="width:
40em; margin-left:
2em
">
821 Returns the compiled message object for aString.
826 <b><a name=Compiler-messageForTokens(aList)><font color=black>messageForTokens(aList)</font></a></b><p>
827 <div style="width:
40em; margin-left:
2em
">
828 Returns the compiled message object for the given token list.
833 <b><a name=Compiler-tokensForString(aString)><font color=black>tokensForString(aString)</font></a></b><p>
834 <div style="width:
40em; margin-left:
2em
">
835 Returns a list of token objects lexed from the input string.
844 <h2><a name=Coroutine><font color=black>Coroutine</font></a></h2>
845 <ul style="width:
40em
">
846 <b><font color=#000>Protos:</font></b> Object
848 Object wrapper for an Io coroutine.
852 <div style="width:
40em; margin-left:
2em
">
853 <b><a href=#Coroutine-exception >exception </a></b><br>
854 <b><a href=#Coroutine-inException >inException </a></b><br>
855 <b><a href=#Coroutine-ioStack >ioStack</a></b><br>
856 <b><a href=#Coroutine-label >label </a></b><br>
857 <b><a href=#Coroutine-parentCoroutine >parentCoroutine </a></b><br>
858 <b><a href=#Coroutine-result >result </a></b><br>
859 <b><a href=#Coroutine-runLocals >runLocals </a></b><br>
860 <b><a href=#Coroutine-runMessage >runMessage </a></b><br>
861 <b><a href=#Coroutine-runTarget >runTarget </a></b><br>
862 <b><a href=#Coroutine-setMessageDebugging(aBoolean) >setMessageDebugging(aBoolean)</a></b><br>
863 <b><a href=#Coroutine-stackSize >stackSize </a></b><br>
864 <b><a href=#Coroutine-yieldingCoros >yieldingCoros </a></b><br>
869 <b><a name=Coroutine-exception ><font color=black>exception </font></a></b><p>
870 <div style="width:
40em; margin-left:
2em
">
871 Returns the current exception or nil if there is none.
876 <b><a name=Coroutine-inException ><font color=black>inException </font></a></b><p>
877 <div style="width:
40em; margin-left:
2em
">
878 Set to true when processing an exception in the coroutine.
883 <b><a name=Coroutine-ioStack><font color=black>ioStack</font></a></b><p>
884 <div style="width:
40em; margin-left:
2em
">
885 Returns List of values on this coroutine's stack.
890 <b><a name=Coroutine-label ><font color=black>label </font></a></b><p>
891 <div style="width:
40em; margin-left:
2em
">
892 A label slot useful for debugging purposes.
897 <b><a name=Coroutine-parentCoroutine ><font color=black>parentCoroutine </font></a></b><p>
898 <div style="width:
40em; margin-left:
2em
">
899 Returns the parent coroutine this one was chained from or nil if it wasn't chained. When a Coroutine ends, it will attempt to resume it's parent.
904 <b><a name=Coroutine-result ><font color=black>result </font></a></b><p>
905 <div style="width:
40em; margin-left:
2em
">
906 The result set when the coroutine ends.
911 <b><a name=Coroutine-runLocals ><font color=black>runLocals </font></a></b><p>
912 <div style="width:
40em; margin-left:
2em
">
913 The locals object in whose context the coroutine will send it's run message.
918 <b><a name=Coroutine-runMessage ><font color=black>runMessage </font></a></b><p>
919 <div style="width:
40em; margin-left:
2em
">
920 The message to send to the runTarget when the coroutine starts.
925 <b><a name=Coroutine-runTarget ><font color=black>runTarget </font></a></b><p>
926 <div style="width:
40em; margin-left:
2em
">
927 The object which the coroutine will send a message to when it starts.
932 <b><a name=Coroutine-setMessageDebugging(aBoolean)><font color=black>setMessageDebugging(aBoolean)</font></a></b><p>
933 <div style="width:
40em; margin-left:
2em
">
934 Turns on message level debugging for this coro. When on, this
935 coro will send a vmWillSendMessage message to the Debugger object before
936 each message send and pause itself. See the Debugger object documentation
937 for more information.
942 <b><a name=Coroutine-stackSize ><font color=black>stackSize </font></a></b><p>
943 <div style="width:
40em; margin-left:
2em
">
944 Stack size allocated for each new coroutine. Coroutines will automatically chain themselves as need if more stack space is required.
949 <b><a name=Coroutine-yieldingCoros ><font color=black>yieldingCoros </font></a></b><p>
950 <div style="width:
40em; margin-left:
2em
">
951 Reference to Scheduler yieldingCoros.
960 <h2><a name=Date><font color=black>Date</font></a></h2>
961 <ul style="width:
40em
">
962 <b><font color=#000>Protos:</font></b> Object
964 A container for a date and time information.
968 <div style="width:
40em; margin-left:
2em
">
969 <b><a href=#Date-+(aDuration) >+(aDuration)</a></b><br>
970 <b><a href=#Date-+=(aDuration) >+=(aDuration)</a></b><br>
971 <b><a href=#Date--(aDurationOrDate) >-(aDurationOrDate)</a></b><br>
972 <b><a href=#Date--=(aDuration) >-=(aDuration)</a></b><br>
973 <b><a href=#Date-asAtomDate >asAtomDate </a></b><br>
974 <b><a href=#Date-asNumber >asNumber</a></b><br>
975 <b><a href=#Date-asString(optionalFormatString) >asString(optionalFormatString)</a></b><br>
976 <b><a href=#Date-clock >clock</a></b><br>
977 <b><a href=#Date-copy(aDate) >copy(aDate)</a></b><br>
978 <b><a href=#Date-cpuSecondsToRun(expression) >cpuSecondsToRun(expression)</a></b><br>
979 <b><a href=#Date-day >day</a></b><br>
980 <b><a href=#Date-format >format</a></b><br>
981 <b><a href=#Date-fromNumber(aNumber) >fromNumber(aNumber)</a></b><br>
982 <b><a href=#Date-fromString(aString, formatString) >fromString(aString, formatString)</a></b><br>
983 <b><a href=#Date-gmtOffset >gmtOffset</a></b><br>
984 <b><a href=#Date-gmtOffsetSeconds >gmtOffsetSeconds</a></b><br>
985 <b><a href=#Date-hour >hour</a></b><br>
986 <b><a href=#Date-isDaylightSavingsTime >isDaylightSavingsTime</a></b><br>
987 <b><a href=#Date-isPast >isPast</a></b><br>
988 <b><a href=#Date-isToday >isToday </a></b><br>
989 <b><a href=#Date-isValidTime(hour, min, sec) >isValidTime(hour, min, sec)</a></b><br>
990 <b><a href=#Date-minute >minute</a></b><br>
991 <b><a href=#Date-month >month</a></b><br>
992 <b><a href=#Date-now >now</a></b><br>
993 <b><a href=#Date-print >print</a></b><br>
994 <b><a href=#Date-second >second</a></b><br>
995 <b><a href=#Date-secondsSince(aDate) >secondsSince(aDate)</a></b><br>
996 <b><a href=#Date-secondsSinceNow(aDate) >secondsSinceNow(aDate)</a></b><br>
997 <b><a href=#Date-secondsToRun(expression) >secondsToRun(expression)</a></b><br>
998 <b><a href=#Date-setDay(aNumber) >setDay(aNumber)</a></b><br>
999 <b><a href=#Date-setHour(aNumber) >setHour(aNumber)</a></b><br>
1000 <b><a href=#Date-setMinute(aNumber) >setMinute(aNumber)</a></b><br>
1001 <b><a href=#Date-setMonth(aNumber) >setMonth(aNumber)</a></b><br>
1002 <b><a href=#Date-setSecond(aNumber) >setSecond(aNumber)</a></b><br>
1003 <b><a href=#Date-setYear(aNumber) >setYear(aNumber)</a></b><br>
1004 <b><a href=#Date-today >today </a></b><br>
1005 <b><a href=#Date-year >year</a></b><br>
1006 <b><a href=#Date-zone >zone</a></b><br>
1011 <b><a name=Date-+(aDuration)><font color=black>+(aDuration)</font></a></b><p>
1012 <div style="width:
40em; margin-left:
2em
">
1013 Return a new Date with the receiver's value plus an amount
1014 of time specified by aDuration object to the receiver.
1019 <b><a name=Date-+=(aDuration)><font color=black>+=(aDuration)</font></a></b><p>
1020 <div style="width:
40em; margin-left:
2em
">
1021 Add aDuration to the receiver. Returns self.
1026 <b><a name=Date--(aDurationOrDate)><font color=black>-(aDurationOrDate)</font></a></b><p>
1027 <div style="width:
40em; margin-left:
2em
">
1028 Return a new Date with the receiver's value minus an amount of time specified by aDuration to the receiver. Returns self.
1033 <b><a name=Date--=(aDuration)><font color=black>-=(aDuration)</font></a></b><p>
1034 <div style="width:
40em; margin-left:
2em
">
1035 Subtract aDuration from the receiver. Returns self.
1040 <b><a name=Date-asAtomDate ><font color=black>asAtomDate </font></a></b><p>
1041 <div style="width:
40em; margin-left:
2em
">
1042 Returns the date formatted as a valid atom date (rfc4287) in the system's timezone.
1047 <b><a name=Date-asNumber><font color=black>asNumber</font></a></b><p>
1048 <div style="width:
40em; margin-left:
2em
">
1049 Returns the date as seconds since 1970.
1054 <b><a name=Date-asString(optionalFormatString)><font color=black>asString(optionalFormatString)</font></a></b><p>
1055 <div style="width:
40em; margin-left:
2em
">
1056 Returns a string representation of the receiver using the
1057 receivers format. If the optionalFormatString argument is present, the
1058 receiver's format is set to it first. Formatting is according to ANSI C
1059 date formating rules.
1062 %a abbreviated weekday name (Sun, Mon, etc.)
1063 %A full weekday name (Sunday, Monday, etc.)
1064 %b abbreviated month name (Jan, Feb, etc.)
1065 %B full month name (January, February, etc.)
1066 %c full date and time string
1067 %d day of the month as two-digit decimal integer (01-31)
1068 %H hour as two-digit 24-hour clock decimal integer (00-23)
1069 %I hour as two-digit 12-hour clock decimal integer (01-12)
1070 %m month as a two-digit decimal integer (01-12)
1071 %M minute as a two-digit decimal integer (00-59)
1072 %p either "AM
" or "PM
"
1073 %S second as a two-digit decimal integer (00-59)
1074 %U number of week in the year as two-digit decimal integer (00-52)
1075 with Sunday considered as first day of the week
1076 %w weekday as one-digit decimal integer (0-6) with Sunday as 0
1077 %W number of week in the year as two-digit decimal integer (00-52)
1078 with Monday considered as first day of the week
1079 %x full date string (no time); in the C locale, this is equivalent
1081 %y year without century as two-digit decimal number (00-99)
1082 %Y year with century as four-digit decimal number
1083 %Z time zone name (e.g. EST);
1084 null string if no time zone can be obtained
1085 %% stands for '%' character in output string.
1091 <b><a name=Date-clock><font color=black>clock</font></a></b><p>
1092 <div style="width:
40em; margin-left:
2em
">
1093 Returns a number containing the number of seconds
1094 of processor time since the beginning of the program or -1 if unavailable.
1099 <b><a name=Date-copy(aDate)><font color=black>copy(aDate)</font></a></b><p>
1100 <div style="width:
40em; margin-left:
2em
">
1101 Sets the receiver to be the same date as aDate. Returns self.
1106 <b><a name=Date-cpuSecondsToRun(expression)><font color=black>cpuSecondsToRun(expression)</font></a></b><p>
1107 <div style="width:
40em; margin-left:
2em
">
1108 Evaluates message and returns a Number whose value
1109 is the cpu seconds taken to do the evaluation.
1114 <b><a name=Date-day><font color=black>day</font></a></b><p>
1115 <div style="width:
40em; margin-left:
2em
">
1116 Returns a number containing the day of the month of the receiver.
1121 <b><a name=Date-format><font color=black>format</font></a></b><p>
1122 <div style="width:
40em; margin-left:
2em
">
1123 Returns the format string for the receiver. Tthe default is \"%Y-%m-%d %H:%M:%S %Z\
".
1128 <b><a name=Date-fromNumber(aNumber)><font color=black>fromNumber(aNumber)</font></a></b><p>
1129 <div style="width:
40em; margin-left:
2em
">
1130 Sets the receiver to be aNumber seconds since 1970.
1135 <b><a name=Date-fromString(aString, formatString)><font color=black>fromString(aString, formatString)</font></a></b><p>
1136 <div style="width:
40em; margin-left:
2em
">
1137 Sets the receiver to the date specified by aString as parsed according to the given formatString. See the Date asString method for formating rules. Returns self.
1142 <b><a name=Date-gmtOffset><font color=black>gmtOffset</font></a></b><p>
1143 <div style="width:
40em; margin-left:
2em
">
1144 Returns the system's timezone string. E.g., +1300 or -0500.
1149 <b><a name=Date-gmtOffsetSeconds><font color=black>gmtOffsetSeconds</font></a></b><p>
1150 <div style="width:
40em; margin-left:
2em
">
1151 Returns the system's seconds east of UTC.
1156 <b><a name=Date-hour><font color=black>hour</font></a></b><p>
1157 <div style="width:
40em; margin-left:
2em
">
1158 Returns a number containing the hour of the day(0-23) of the receiver.
1163 <b><a name=Date-isDaylightSavingsTime><font color=black>isDaylightSavingsTime</font></a></b><p>
1164 <div style="width:
40em; margin-left:
2em
">
1165 Returns self if Daylight Saving Time is in effect for the receiver, otherwise returns Nil.
1170 <b><a name=Date-isPast><font color=black>isPast</font></a></b><p>
1171 <div style="width:
40em; margin-left:
2em
">
1172 Returns true if the receiver is a date in the past.
1177 <b><a name=Date-isToday ><font color=black>isToday </font></a></b><p>
1178 <div style="width:
40em; margin-left:
2em
">
1179 Returns true if the receiver's date is today's date.
1184 <b><a name=Date-isValidTime(hour, min, sec)><font color=black>isValidTime(hour, min, sec)</font></a></b><p>
1185 <div style="width:
40em; margin-left:
2em
">
1186 Returns self if the specified time is valid, otherwise returns Nil.
1187 A negative value will count back; i.e., a value of -5 for the hour,
1188 will count back 5 hours to return a value of 19. No adjustment is
1189 done for values above 24.
1194 <b><a name=Date-minute><font color=black>minute</font></a></b><p>
1195 <div style="width:
40em; margin-left:
2em
">
1196 Returns a number containing the minute of the hour(0-59) of the receiver.
1201 <b><a name=Date-month><font color=black>month</font></a></b><p>
1202 <div style="width:
40em; margin-left:
2em
">
1203 Returns a number containing the month(1-12) of the year of the receiver.
1208 <b><a name=Date-now><font color=black>now</font></a></b><p>
1209 <div style="width:
40em; margin-left:
2em
">
1210 Sets the receiver to the current time. Returns self.
1215 <b><a name=Date-print><font color=black>print</font></a></b><p>
1216 <div style="width:
40em; margin-left:
2em
">
1217 Prints the receiver. Returns self.
1222 <b><a name=Date-second><font color=black>second</font></a></b><p>
1223 <div style="width:
40em; margin-left:
2em
">
1224 Returns a number containing the seconds of the minute(0-59) of the receiver. This number may contain fractions of seconds.
1229 <b><a name=Date-secondsSince(aDate)><font color=black>secondsSince(aDate)</font></a></b><p>
1230 <div style="width:
40em; margin-left:
2em
">
1231 Returns a number of seconds of between aDate and the receiver.
1236 <b><a name=Date-secondsSinceNow(aDate)><font color=black>secondsSinceNow(aDate)</font></a></b><p>
1237 <div style="width:
40em; margin-left:
2em
">
1238 Returns the number of seconds since aDate.
1243 <b><a name=Date-secondsToRun(expression)><font color=black>secondsToRun(expression)</font></a></b><p>
1244 <div style="width:
40em; margin-left:
2em
">
1245 Evaluates message and returns a Number whose value is the number of seconds taken to do the evaluation
1250 <b><a name=Date-setDay(aNumber)><font color=black>setDay(aNumber)</font></a></b><p>
1251 <div style="width:
40em; margin-left:
2em
">
1252 Sets the day of the receiver. Returns self.
1257 <b><a name=Date-setHour(aNumber)><font color=black>setHour(aNumber)</font></a></b><p>
1258 <div style="width:
40em; margin-left:
2em
">
1259 Sets the hour of the receiver. Returns self.
1264 <b><a name=Date-setMinute(aNumber)><font color=black>setMinute(aNumber)</font></a></b><p>
1265 <div style="width:
40em; margin-left:
2em
">
1266 Sets the minute of the receiver. Returns self.
1271 <b><a name=Date-setMonth(aNumber)><font color=black>setMonth(aNumber)</font></a></b><p>
1272 <div style="width:
40em; margin-left:
2em
">
1273 Sets the month(1-12) of the receiver. Returns self.
1278 <b><a name=Date-setSecond(aNumber)><font color=black>setSecond(aNumber)</font></a></b><p>
1279 <div style="width:
40em; margin-left:
2em
">
1280 Sets the second of the receiver. Returns self.
1285 <b><a name=Date-setYear(aNumber)><font color=black>setYear(aNumber)</font></a></b><p>
1286 <div style="width:
40em; margin-left:
2em
">
1287 Sets the year of the receiver.
1292 <b><a name=Date-today ><font color=black>today </font></a></b><p>
1293 <div style="width:
40em; margin-left:
2em
">
1294 Set the receiver to the current date, no time information
1295 is included. See `now' for the current date and time.
1300 <b><a name=Date-year><font color=black>year</font></a></b><p>
1301 <div style="width:
40em; margin-left:
2em
">
1302 Returns a number containing the year of the receiver.
1307 <b><a name=Date-zone><font color=black>zone</font></a></b><p>
1308 <div style="width:
40em; margin-left:
2em
">
1309 Returns a string containing the system's time zone code.
1318 <h2><a name=Debugger><font color=black>Debugger</font></a></h2>
1319 <ul style="width:
40em
">
1320 <b><font color=#000>Protos:</font></b> Object
1321 <h3>Description</h3>
1322 Contains methods related to the IoVM debugger.
1326 <div style="width:
40em; margin-left:
2em
">
1327 <b><a href=#Debugger-debuggerCoroutine >debuggerCoroutine </a></b><br>
1328 <b><a href=#Debugger-description >description</a></b><br>
1329 <b><a href=#Debugger-start >start </a></b><br>
1330 <b><a href=#Debugger-vmWillSendMessage >vmWillSendMessage </a></b><br>
1335 <b><a name=Debugger-debuggerCoroutine ><font color=black>debuggerCoroutine </font></a></b><p>
1336 <div style="width:
40em; margin-left:
2em
">
1337 Returns the coroutine used for the debugger.")
1342 <b><a name=Debugger-description
><font color=black
>description
</font></a></b><p>
1343 <div style=
"width:40em; margin-left:2em">
1344 To start debugging a coroutine, call
1346 Coroutine currentCoroutine setMessageDebugging(true)
1348 Then each message sent within that coroutine will cause the Debugger
1349 vmWillSendMessage slot to be activated and the Debugger slots:
1350 messageCoroutine, messageSelf, messageLocals, and message will be set with the
1351 values related to the current message send. You can override vmWillSendMessage to
1352 implement your own debugging mechanisms.
1357 <b><a name=Debugger-start
><font color=black
>start
</font></a></b><p>
1358 <div style=
"width:40em; margin-left:2em">
1359 Starts the debugger.
")
1364 <b><a name=Debugger-vmWillSendMessage ><font color=black>vmWillSendMessage </font></a></b><p>
1365 <div style="width:
40em; margin-left:
2em
">
1366 Override this method to implement your own debugging mechanisms. Default behavior is to print every message sent.")
1375 <h2><a name=Directory
><font color=black
>Directory
</font></a></h2>
1376 <ul style=
"width:40em">
1377 <b><font color=#
000>Protos:
</font></b> Object
1378 <h3>Description
</h3>
1379 The Directory object supports accessing filesystem directories. A note on paths;
1380 if a path begins with a
"/" it's the root,
1381 if it beings with a
"./" it's the launch path,
1382 if not specified,
"./" is assumed.
""")
1386 <div style="width:
40em; margin-left:
2em
">
1387 <b><a href=#Directory-at(aString) >at(aString)</a></b><br>
1388 <b><a href=#Directory-create >create</a></b><br>
1389 <b><a href=#Directory-createSubdirectory(name) >createSubdirectory(name)</a></b><br>
1390 <b><a href=#Directory-currentWorkingDirectory >currentWorkingDirectory</a></b><br>
1391 <b><a href=#Directory-exists(optionalPath) >exists(optionalPath)</a></b><br>
1392 <b><a href=#Directory-items >items</a></b><br>
1393 <b><a href=#Directory-name >name</a></b><br>
1394 <b><a href=#Directory-path >path</a></b><br>
1395 <b><a href=#Directory-setCurrentWorkingDirectory(pathString) >setCurrentWorkingDirectory(pathString)</a></b><br>
1396 <b><a href=#Directory-setPath(aString) >setPath(aString)</a></b><br>
1397 <b><a href=#Directory-size >size</a></b><br>
1398 <b><a href=#Directory-with(aPath) >with(aPath)</a></b><br>
1403 <b><a name=Directory-at(aString)><font color=black>at(aString)</font></a></b><p>
1404 <div style="width:
40em; margin-left:
2em
">
1405 Returns a File or Directory object matching the name specified
1406 by aString or Nil if no such file or directory exists.
1411 <b><a name=Directory-create><font color=black>create</font></a></b><p>
1412 <div style="width:
40em; margin-left:
2em
">
1413 Create the directory if it doesn't exist.
1418 <b><a name=Directory-createSubdirectory(name)><font color=black>createSubdirectory(name)</font></a></b><p>
1419 <div style="width:
40em; margin-left:
2em
">
1420 Create a subdirectory with the specified name.
1425 <b><a name=Directory-currentWorkingDirectory><font color=black>currentWorkingDirectory</font></a></b><p>
1426 <div style="width:
40em; margin-left:
2em
">
1427 Returns the current working directory path.
1432 <b><a name=Directory-exists(optionalPath)><font color=black>exists(optionalPath)</font></a></b><p>
1433 <div style="width:
40em; margin-left:
2em
">
1434 Returns true if the Directory path exists, and false otherwise.
1435 If optionalPath string is provided, it tests the existance of that path instead.
1440 <b><a name=Directory-items><font color=black>items</font></a></b><p>
1441 <div style="width:
40em; margin-left:
2em
">
1442 Returns a list object containing File and Directory objects
1443 for the files and directories of the receiver's path.
1448 <b><a name=Directory-name><font color=black>name</font></a></b><p>
1449 <div style="width:
40em; margin-left:
2em
">
1450 Returns the receiver's last path component.
1455 <b><a name=Directory-path><font color=black>path</font></a></b><p>
1456 <div style="width:
40em; margin-left:
2em
">
1457 Returns the directory path. The default path is '.'.
1462 <b><a name=Directory-setCurrentWorkingDirectory(pathString)><font color=black>setCurrentWorkingDirectory(pathString)</font></a></b><p>
1463 <div style="width:
40em; margin-left:
2em
">
1464 Set's the current working directory path.
1465 Returns true on success or false on error.
1470 <b><a name=Directory-setPath(aString)><font color=black>setPath(aString)</font></a></b><p>
1471 <div style="width:
40em; margin-left:
2em
">
1472 Sets the directory path. Returns self.
1477 <b><a name=Directory-size><font color=black>size</font></a></b><p>
1478 <div style="width:
40em; margin-left:
2em
">
1479 Returns a Number containing the number of file and directory
1480 object at the receiver's path.
1485 <b><a name=Directory-with(aPath)><font color=black>with(aPath)</font></a></b><p>
1486 <div style="width:
40em; margin-left:
2em
">
1487 Returns a new instance with the provided path.")
1496 <h2><a name=Duration
><font color=black
>Duration
</font></a></h2>
1497 <ul style=
"width:40em">
1498 <b><font color=#
000>Protos:
</font></b> Object
1499 <h3>Description
</h3>
1500 A container for a duration of time.
1504 <div style=
"width:40em; margin-left:2em">
1505 <b><a href=#Duration-+
>+
</a></b><br>
1506 <b><a href=#Duration-+=(aDuration)
>+=(aDuration)
</a></b><br>
1507 <b><a href=#Duration--
>-
</a></b><br>
1508 <b><a href=#Duration--=(aDuration)
>-=(aDuration)
</a></b><br>
1509 <b><a href=#Duration-asNumber
>asNumber
</a></b><br>
1510 <b><a href=#Duration-asString(formatString)
>asString(formatString)
</a></b><br>
1511 <b><a href=#Duration-days
>days
</a></b><br>
1512 <b><a href=#Duration-fromNumber(aNumber)
>fromNumber(aNumber)
</a></b><br>
1513 <b><a href=#Duration-hours
>hours
</a></b><br>
1514 <b><a href=#Duration-minutes
>minutes
</a></b><br>
1515 <b><a href=#Duration-print
>print
</a></b><br>
1516 <b><a href=#Duration-seconds
>seconds
</a></b><br>
1517 <b><a href=#Duration-setDays(aNumber)
>setDays(aNumber)
</a></b><br>
1518 <b><a href=#Duration-setHours(aNumber)
>setHours(aNumber)
</a></b><br>
1519 <b><a href=#Duration-setMinutes(aNumber)
>setMinutes(aNumber)
</a></b><br>
1520 <b><a href=#Duration-setSeconds(aNumber)
>setSeconds(aNumber)
</a></b><br>
1521 <b><a href=#Duration-setYears(aNumber)
>setYears(aNumber)
</a></b><br>
1522 <b><a href=#Duration-totalSeconds
>totalSeconds
</a></b><br>
1523 <b><a href=#Duration-years
>years
</a></b><br>
1528 <b><a name=Duration-+
><font color=black
>+
</font></a></b><p>
1529 <div style=
"width:40em; margin-left:2em">
1530 Returns a new Duration of the two added.
1535 <b><a name=Duration-+=(aDuration)
><font color=black
>+=(aDuration)
</font></a></b><p>
1536 <div style=
"width:40em; margin-left:2em">
1537 Add aDuration to the receiver. Returns self.
1542 <b><a name=Duration--
><font color=black
>-
</font></a></b><p>
1543 <div style=
"width:40em; margin-left:2em">
1544 Returns a new Duration of the two subtracted.
1549 <b><a name=Duration--=(aDuration)
><font color=black
>-=(aDuration)
</font></a></b><p>
1550 <div style=
"width:40em; margin-left:2em">
1551 Subtract aDuration to the receiver. Returns self.
1556 <b><a name=Duration-asNumber
><font color=black
>asNumber
</font></a></b><p>
1557 <div style=
"width:40em; margin-left:2em">
1558 Returns a number representation of the receiver.
1559 (where
1 is equal to one second)
1564 <b><a name=Duration-asString(formatString)
><font color=black
>asString(formatString)
</font></a></b><p>
1565 <div style=
"width:40em; margin-left:2em">
1566 Returns a string representation of the receiver. The formatString argument is optional. If present, the returned string will be formatted according to ANSI C date formating rules.
1569 %y years without century as two-digit decimal number (
00-
99)
1570 %Y year with century as four-digit decimal number
1573 %H hour as two-digit
24-hour clock decimal integer (
00-
23)
1574 %M minute as a two-digit decimal integer (
00-
59)
1575 %S second as a two-digit decimal integer (
00-
59)
1577 The default format is
"%Y %d %H:%M:%S".
1583 <b><a name=Duration-days
><font color=black
>days
</font></a></b><p>
1584 <div style=
"width:40em; margin-left:2em">
1585 Returns a number containing the day of the month of the receiver.
1590 <b><a name=Duration-fromNumber(aNumber)
><font color=black
>fromNumber(aNumber)
</font></a></b><p>
1591 <div style=
"width:40em; margin-left:2em">
1592 Sets the receiver to the Duration specified by
1593 aNumber(same format number as returned by Duration asNumber). Returns self.
1598 <b><a name=Duration-hours
><font color=black
>hours
</font></a></b><p>
1599 <div style=
"width:40em; margin-left:2em">
1600 Returns a number containing the hour of the day(
0-
23) of the receiver.
1605 <b><a name=Duration-minutes
><font color=black
>minutes
</font></a></b><p>
1606 <div style=
"width:40em; margin-left:2em">
1607 Returns a number containing the minute of the hour(
0-
59) of the receiver.
1612 <b><a name=Duration-print
><font color=black
>print
</font></a></b><p>
1613 <div style=
"width:40em; margin-left:2em">
1614 Prints the receiver. Returns self.
1619 <b><a name=Duration-seconds
><font color=black
>seconds
</font></a></b><p>
1620 <div style=
"width:40em; margin-left:2em">
1621 Returns a number containing the seconds of the minute(
0-
59) of the receiver.
1622 This number may contain fractions of seconds.
1627 <b><a name=Duration-setDays(aNumber)
><font color=black
>setDays(aNumber)
</font></a></b><p>
1628 <div style=
"width:40em; margin-left:2em">
1629 Sets the day of the receiver. Returns self.
1634 <b><a name=Duration-setHours(aNumber)
><font color=black
>setHours(aNumber)
</font></a></b><p>
1635 <div style=
"width:40em; margin-left:2em">
1636 Sets the hour of the receiver. Returns self.
1641 <b><a name=Duration-setMinutes(aNumber)
><font color=black
>setMinutes(aNumber)
</font></a></b><p>
1642 <div style=
"width:40em; margin-left:2em">
1643 Sets the minute of the receiver. Returns self.
1648 <b><a name=Duration-setSeconds(aNumber)
><font color=black
>setSeconds(aNumber)
</font></a></b><p>
1649 <div style=
"width:40em; margin-left:2em">
1650 Sets the second of the receiver. Return self.
1655 <b><a name=Duration-setYears(aNumber)
><font color=black
>setYears(aNumber)
</font></a></b><p>
1656 <div style=
"width:40em; margin-left:2em">
1657 Sets the year of the receiver. Returns self.
1662 <b><a name=Duration-totalSeconds
><font color=black
>totalSeconds
</font></a></b><p>
1663 <div style=
"width:40em; margin-left:2em">
1669 <b><a name=Duration-years
><font color=black
>years
</font></a></b><p>
1670 <div style=
"width:40em; margin-left:2em">
1671 Returns a number containing the year of the receiver.
1680 <h2><a name=DynLib
><font color=black
>DynLib
</font></a></h2>
1681 <ul style=
"width:40em">
1682 <b><font color=#
000>Protos:
</font></b> Object
1683 <h3>Description
</h3>
1684 A DLL Loader by Kentaro A. Kurahone.
1688 <div style=
"width:40em; margin-left:2em">
1689 <b><a href=#DynLib-call(functionName,
<arg1
>,
<arg2
>, ...)
>call(functionName,
<arg1
>,
<arg2
>, ...)
</a></b><br>
1690 <b><a href=#DynLib-callPluginInit(functionName)
>callPluginInit(functionName)
</a></b><br>
1691 <b><a href=#DynLib-close
>close
</a></b><br>
1692 <b><a href=#DynLib-freeFuncName
>freeFuncName
</a></b><br>
1693 <b><a href=#DynLib-initFuncName
>initFuncName
</a></b><br>
1694 <b><a href=#DynLib-isOpen
>isOpen
</a></b><br>
1695 <b><a href=#DynLib-open
>open
</a></b><br>
1696 <b><a href=#DynLib-path
>path
</a></b><br>
1697 <b><a href=#DynLib-setFreeFuncName(aString)
>setFreeFuncName(aString)
</a></b><br>
1698 <b><a href=#DynLib-setInitFuncName(aString)
>setInitFuncName(aString)
</a></b><br>
1699 <b><a href=#DynLib-setPath(aString)
>setPath(aString)
</a></b><br>
1700 <b><a href=#DynLib-voidCall(functionName,
<arg1
>,
<arg2
>, ...)
>voidCall(functionName,
<arg1
>,
<arg2
>, ...)
</a></b><br>
1705 <b><a name=DynLib-call(functionName,
<arg1
>,
<arg2
>, ...)
><font color=black
>call(functionName,
<arg1
>,
<arg2
>, ...)
</font></a></b><p>
1706 <div style=
"width:40em; margin-left:2em">
1707 Call's the dll function of the specified name with the arguments provided.
1708 Returns the a Number with the result value.
1713 <b><a name=DynLib-callPluginInit(functionName)
><font color=black
>callPluginInit(functionName)
</font></a></b><p>
1714 <div style=
"width:40em; margin-left:2em">
1715 Call's the dll function of the specified name.
1716 Returns the result as a Number or raises an exception on error.
1721 <b><a name=DynLib-close
><font color=black
>close
</font></a></b><p>
1722 <div style=
"width:40em; margin-left:2em">
1723 Closes the library. Returns self.
1728 <b><a name=DynLib-freeFuncName
><font color=black
>freeFuncName
</font></a></b><p>
1729 <div style=
"width:40em; margin-left:2em">
1730 Returns the io_free function name.
1735 <b><a name=DynLib-initFuncName
><font color=black
>initFuncName
</font></a></b><p>
1736 <div style=
"width:40em; margin-left:2em">
1737 Returns the initialization function name.
1742 <b><a name=DynLib-isOpen
><font color=black
>isOpen
</font></a></b><p>
1743 <div style=
"width:40em; margin-left:2em">
1744 Returns true if the library is open, or false otherwise.
1749 <b><a name=DynLib-open
><font color=black
>open
</font></a></b><p>
1750 <div style=
"width:40em; margin-left:2em">
1751 Opens the dynamic library and returns self or raises a DynLoad.open Error if there is an error.
1756 <b><a name=DynLib-path
><font color=black
>path
</font></a></b><p>
1757 <div style=
"width:40em; margin-left:2em">
1758 Returns the path to the dynamic library.
1763 <b><a name=DynLib-setFreeFuncName(aString)
><font color=black
>setFreeFuncName(aString)
</font></a></b><p>
1764 <div style=
"width:40em; margin-left:2em">
1765 Sets the io_free function name. Returns self.
1770 <b><a name=DynLib-setInitFuncName(aString)
><font color=black
>setInitFuncName(aString)
</font></a></b><p>
1771 <div style=
"width:40em; margin-left:2em">
1772 Sets the initialization function name for the dynamic library. Returns self.
1777 <b><a name=DynLib-setPath(aString)
><font color=black
>setPath(aString)
</font></a></b><p>
1778 <div style=
"width:40em; margin-left:2em">
1779 Sets the path to the dynamic library. Returns self.
1784 <b><a name=DynLib-voidCall(functionName,
<arg1
>,
<arg2
>, ...)
><font color=black
>voidCall(functionName,
<arg1
>,
<arg2
>, ...)
</font></a></b><p>
1785 <div style=
"width:40em; margin-left:2em">
1786 Same as call but for functions with no return value. Returns nil.
1795 <h2><a name=File
><font color=black
>File
</font></a></h2>
1796 <ul style=
"width:40em">
1797 <b><font color=#
000>Protos:
</font></b> Object
1798 <h3>Description
</h3>
1799 Encapsulates file i/o. Here's an example of opening a file,
1800 and reversing it's lines:
1802 file = File clone openForUpdating(
"/tmp/test")
1803 lines = file readLines reverse
1805 lines foreach(i, line, file write(line,
"\n"))
1811 <div style=
"width:40em; margin-left:2em">
1812 <b><a href=#File-asBuffer
>asBuffer
</a></b><br>
1813 <b><a href=#File-at(aNumber)
>at(aNumber)
</a></b><br>
1814 <b><a href=#File-atPut(positionNumber, byteNumber)
>atPut(positionNumber, byteNumber)
</a></b><br>
1815 <b><a href=#File-close
>close
</a></b><br>
1816 <b><a href=#File-contents
>contents
</a></b><br>
1817 <b><a href=#File-descriptor
>descriptor
</a></b><br>
1818 <b><a href=#File-exists
>exists
</a></b><br>
1819 <b><a href=#File-flush
>flush
</a></b><br>
1820 <b><a href=#File-foreach(optionalIndex, value, message)
>foreach(optionalIndex, value, message)
</a></b><br>
1821 <b><a href=#File-foreachLine(optionalLineNumber, line, message)
>foreachLine(optionalLineNumber, line, message)
</a></b><br>
1822 <b><a href=#File-groupId
>groupId
</a></b><br>
1823 <b><a href=#File-isAtEnd
>isAtEnd
</a></b><br>
1824 <b><a href=#File-isDirectory
>isDirectory
</a></b><br>
1825 <b><a href=#File-isLink
>isLink
</a></b><br>
1826 <b><a href=#File-isOpen
>isOpen
</a></b><br>
1827 <b><a href=#File-isPipe
>isPipe
</a></b><br>
1828 <b><a href=#File-isRegularFile
>isRegularFile
</a></b><br>
1829 <b><a href=#File-isSocket
>isSocket
</a></b><br>
1830 <b><a href=#File-isUserExecutable
>isUserExecutable
</a></b><br>
1831 <b><a href=#File-lastAccessDate
>lastAccessDate
</a></b><br>
1832 <b><a href=#File-lastDataChangeDate
>lastDataChangeDate
</a></b><br>
1833 <b><a href=#File-lastInfoChangeDate
>lastInfoChangeDate
</a></b><br>
1834 <b><a href=#File-mode
>mode
</a></b><br>
1835 <b><a href=#File-moveTo(pathString)
>moveTo(pathString)
</a></b><br>
1836 <b><a href=#File-name
>name
</a></b><br>
1837 <b><a href=#File-open(optionalPathString)
>open(optionalPathString)
</a></b><br>
1838 <b><a href=#File-openForAppending(optionalPathString)
>openForAppending(optionalPathString)
</a></b><br>
1839 <b><a href=#File-openForReading(optionalPathString)
>openForReading(optionalPathString)
</a></b><br>
1840 <b><a href=#File-openForUpdating(optionalPathString)
>openForUpdating(optionalPathString)
</a></b><br>
1841 <b><a href=#File-path
>path
</a></b><br>
1842 <b><a href=#File-popen
>popen
</a></b><br>
1843 <b><a href=#File-position
>position
</a></b><br>
1844 <b><a href=#File-positionAtEnd
>positionAtEnd
</a></b><br>
1845 <b><a href=#File-protectionMode
>protectionMode
</a></b><br>
1846 <b><a href=#File-readBufferOfLength(aNumber)
>readBufferOfLength(aNumber)
</a></b><br>
1847 <b><a href=#File-readLine
>readLine
</a></b><br>
1848 <b><a href=#File-readLines
>readLines
</a></b><br>
1849 <b><a href=#File-readStringOfLength(aNumber)
>readStringOfLength(aNumber)
</a></b><br>
1850 <b><a href=#File-readToBufferOfLength(aBuffer, aNumber)
>readToBufferOfLength(aBuffer, aNumber)
</a></b><br>
1851 <b><a href=#File-remove
>remove
</a></b><br>
1852 <b><a href=#File-rewind
>rewind
</a></b><br>
1853 <b><a href=#File-setPath(aString)
>setPath(aString)
</a></b><br>
1854 <b><a href=#File-setPosition(aNumber)
>setPosition(aNumber)
</a></b><br>
1855 <b><a href=#File-size
>size
</a></b><br>
1856 <b><a href=#File-standardError
>standardError
</a></b><br>
1857 <b><a href=#File-standardInput
>standardInput
</a></b><br>
1858 <b><a href=#File-standardOutput
>standardOutput
</a></b><br>
1859 <b><a href=#File-stat
>stat
</a></b><br>
1860 <b><a href=#File-statSize
>statSize
</a></b><br>
1861 <b><a href=#File-temporaryFile
>temporaryFile
</a></b><br>
1862 <b><a href=#File-truncateToSize(numberOfBytes)
>truncateToSize(numberOfBytes)
</a></b><br>
1863 <b><a href=#File-userId
>userId
</a></b><br>
1864 <b><a href=#File-with(aPath)
>with(aPath)
</a></b><br>
1865 <b><a href=#File-write(aSequence1, aSequence2, ...)
>write(aSequence1, aSequence2, ...)
</a></b><br>
1870 <b><a name=File-asBuffer
><font color=black
>asBuffer
</font></a></b><p>
1871 <div style=
"width:40em; margin-left:2em">
1872 Opens the receiver in read only mode, reads the whole
1873 contents of the file into a buffer object, closes the file and returns the buffer.
1878 <b><a name=File-at(aNumber)
><font color=black
>at(aNumber)
</font></a></b><p>
1879 <div style=
"width:40em; margin-left:2em">
1880 Returns a Number containing the byte at the specified
1881 byte index or Nil if the index is out of bounds.
1886 <b><a name=File-atPut(positionNumber, byteNumber)
><font color=black
>atPut(positionNumber, byteNumber)
</font></a></b><p>
1887 <div style=
"width:40em; margin-left:2em">
1888 Writes the byte value of byteNumber to the file position
1889 positionNumber. Returns self.
1894 <b><a name=File-close
><font color=black
>close
</font></a></b><p>
1895 <div style=
"width:40em; margin-left:2em">
1896 Closes the receiver if open, otherwise does nothing. Returns self.
1901 <b><a name=File-contents
><font color=black
>contents
</font></a></b><p>
1902 <div style=
"width:40em; margin-left:2em">
1903 Returns contents of the file as a mutable Sequence of bytes.
1908 <b><a name=File-descriptor
><font color=black
>descriptor
</font></a></b><p>
1909 <div style=
"width:40em; margin-left:2em">
1910 Returns the file's descriptor as a number.
1915 <b><a name=File-exists
><font color=black
>exists
</font></a></b><p>
1916 <div style=
"width:40em; margin-left:2em">
1917 Returns true if the file specified by the receiver's
1918 path exists, false otherwise.
1923 <b><a name=File-flush
><font color=black
>flush
</font></a></b><p>
1924 <div style=
"width:40em; margin-left:2em">
1925 Forces any buffered data to be written to disk. Returns self.
1930 <b><a name=File-foreach(optionalIndex, value, message)
><font color=black
>foreach(optionalIndex, value, message)
</font></a></b><p>
1931 <div style=
"width:40em; margin-left:2em">
1932 For each byte, set index to the index of the byte
1933 and value to the number containing the byte value and execute aMessage.
1937 aFile foreach(i, v, writeln(
"byte at ", i,
" is ", v))
1938 aFile foreach(v, writeln(
"byte ", v))
1944 <b><a name=File-foreachLine(optionalLineNumber, line, message)
><font color=black
>foreachLine(optionalLineNumber, line, message)
</font></a></b><p>
1945 <div style=
"width:40em; margin-left:2em">
1946 For each line, set index to the line number of the line
1947 and line and execute aMessage.
1950 aFile foreachLine(i, v, writeln(
"Line ", i,
": ", v))
1951 aFile foreach(v, writeln(
"Line: ", v))
1957 <b><a name=File-groupId
><font color=black
>groupId
</font></a></b><p>
1958 <div style=
"width:40em; margin-left:2em">
1959 Returns a Number containing the group id associated with the file's path.
1964 <b><a name=File-isAtEnd
><font color=black
>isAtEnd
</font></a></b><p>
1965 <div style=
"width:40em; margin-left:2em">
1966 Returns true if the file is at it's end. Otherwise returns false.
1971 <b><a name=File-isDirectory
><font color=black
>isDirectory
</font></a></b><p>
1972 <div style=
"width:40em; margin-left:2em">
1973 Returns true if the receiver's path points to a directory, false otherwise.
1978 <b><a name=File-isLink
><font color=black
>isLink
</font></a></b><p>
1979 <div style=
"width:40em; margin-left:2em">
1980 Returns true if the receiver's path points to a link, false otherwise.
1985 <b><a name=File-isOpen
><font color=black
>isOpen
</font></a></b><p>
1986 <div style=
"width:40em; margin-left:2em">
1987 Returns self if the file is open. Otherwise returns Nil.
1992 <b><a name=File-isPipe
><font color=black
>isPipe
</font></a></b><p>
1993 <div style=
"width:40em; margin-left:2em">
1994 Returns true if the receiver is a pipe, false otherwise.
1999 <b><a name=File-isRegularFile
><font color=black
>isRegularFile
</font></a></b><p>
2000 <div style=
"width:40em; margin-left:2em">
2001 Returns true if the receiver's file descriptor is a regular file, false otherwise.
2006 <b><a name=File-isSocket
><font color=black
>isSocket
</font></a></b><p>
2007 <div style=
"width:40em; margin-left:2em">
2008 Returns true if the receiver's file descriptor is a Socket, false otherwise.
2013 <b><a name=File-isUserExecutable
><font color=black
>isUserExecutable
</font></a></b><p>
2014 <div style=
"width:40em; margin-left:2em">
2015 Returns true if the receiver is user group executable, false otherwise.
2020 <b><a name=File-lastAccessDate
><font color=black
>lastAccessDate
</font></a></b><p>
2021 <div style=
"width:40em; margin-left:2em">
2022 Returns a Date object containing the last date and
2023 time the file was accessed.
2028 <b><a name=File-lastDataChangeDate
><font color=black
>lastDataChangeDate
</font></a></b><p>
2029 <div style=
"width:40em; margin-left:2em">
2030 Returns a Date object containing the last date and
2031 time the file's contents were changed.
2036 <b><a name=File-lastInfoChangeDate
><font color=black
>lastInfoChangeDate
</font></a></b><p>
2037 <div style=
"width:40em; margin-left:2em">
2038 Returns a Date object containing the last date and
2039 time the file's meta info was changed.
2044 <b><a name=File-mode
><font color=black
>mode
</font></a></b><p>
2045 <div style=
"width:40em; margin-left:2em">
2046 Returns the open mode of the file(either read, update or append).
2051 <b><a name=File-moveTo(pathString)
><font color=black
>moveTo(pathString)
</font></a></b><p>
2052 <div style=
"width:40em; margin-left:2em">
2053 Moves the file specified by the receiver's path to the
2054 new path pathString. Raises an File doesNotExist exception if the
2055 file does not exist or a File nameConflict exception if the file
2056 nameString already exists.
2061 <b><a name=File-name
><font color=black
>name
</font></a></b><p>
2062 <div style=
"width:40em; margin-left:2em">
2063 Returns the last path component of the file path.
2068 <b><a name=File-open(optionalPathString)
><font color=black
>open(optionalPathString)
</font></a></b><p>
2069 <div style=
"width:40em; margin-left:2em">
2070 Opens the file. Creates one if it does not exist.
2071 If the optionalPathString argument is provided, the path is set to it before
2072 opening. Returns self or raises an File exception on error.
2077 <b><a name=File-openForAppending(optionalPathString)
><font color=black
>openForAppending(optionalPathString)
</font></a></b><p>
2078 <div style=
"width:40em; margin-left:2em">
2079 Sets the file mode to append (writing to the end of the file)
2080 and calls open(optionalPathString).
2085 <b><a name=File-openForReading(optionalPathString)
><font color=black
>openForReading(optionalPathString)
</font></a></b><p>
2086 <div style=
"width:40em; margin-left:2em">
2087 Sets the file mode to read (reading only) and calls open(optionalPathString).
2092 <b><a name=File-openForUpdating(optionalPathString)
><font color=black
>openForUpdating(optionalPathString)
</font></a></b><p>
2093 <div style=
"width:40em; margin-left:2em">
2094 Sets the file mode to update (reading and writing) and calls
2095 open(optionalPathString). This will not delete the file if it already exists.
2096 Use the remove method first if you need to delete an existing file before opening a new one.
2101 <b><a name=File-path
><font color=black
>path
</font></a></b><p>
2102 <div style=
"width:40em; margin-left:2em">
2103 Returns the file path of the receiver.
2108 <b><a name=File-popen
><font color=black
>popen
</font></a></b><p>
2109 <div style=
"width:40em; margin-left:2em">
2110 Open the file as a pipe. Return self.
2115 <b><a name=File-position
><font color=black
>position
</font></a></b><p>
2116 <div style=
"width:40em; margin-left:2em">
2117 Returns the current file pointer byte position as a Number.
2122 <b><a name=File-positionAtEnd
><font color=black
>positionAtEnd
</font></a></b><p>
2123 <div style=
"width:40em; margin-left:2em">
2124 Sets the file position pointer to the end of the file.
2129 <b><a name=File-protectionMode
><font color=black
>protectionMode
</font></a></b><p>
2130 <div style=
"width:40em; margin-left:2em">
2131 Returns a Number containing the protection mode
2132 associated with the file's path.
2137 <b><a name=File-readBufferOfLength(aNumber)
><font color=black
>readBufferOfLength(aNumber)
</font></a></b><p>
2138 <div style=
"width:40em; margin-left:2em">
2139 Reads a Buffer of the specified length and returns it.
2140 Returns Nil if the end of the file has been reached.
2145 <b><a name=File-readLine
><font color=black
>readLine
</font></a></b><p>
2146 <div style=
"width:40em; margin-left:2em">
2147 Reads the next line of the file and returns it as a
2148 string without the return character. Returns Nil if the
2149 end of the file has been reached.
2154 <b><a name=File-readLines
><font color=black
>readLines
</font></a></b><p>
2155 <div style=
"width:40em; margin-left:2em">
2156 Returns list containing all lines in the file.
2161 <b><a name=File-readStringOfLength(aNumber)
><font color=black
>readStringOfLength(aNumber)
</font></a></b><p>
2162 <div style=
"width:40em; margin-left:2em">
2163 Reads a String of the specified length and returns it.
2164 Returns Nil if the end of the file has been reached.
2169 <b><a name=File-readToBufferOfLength(aBuffer, aNumber)
><font color=black
>readToBufferOfLength(aBuffer, aNumber)
</font></a></b><p>
2170 <div style=
"width:40em; margin-left:2em">
2171 Reads at most aNumber number of items and appends them to aBuffer.
2172 Returns number of items read.
2177 <b><a name=File-remove
><font color=black
>remove
</font></a></b><p>
2178 <div style=
"width:40em; margin-left:2em">
2179 Removes the file specified by the receiver's path.
2180 Raises an error if the file exists but is not removed. Returns self.
2185 <b><a name=File-rewind
><font color=black
>rewind
</font></a></b><p>
2186 <div style=
"width:40em; margin-left:2em">
2187 Sets the file position pointer to the beginning of the file.
2192 <b><a name=File-setPath(aString)
><font color=black
>setPath(aString)
</font></a></b><p>
2193 <div style=
"width:40em; margin-left:2em">
2194 Sets the file path of the receiver to pathString.
2195 The default path is an empty string. Returns self.
2200 <b><a name=File-setPosition(aNumber)
><font color=black
>setPosition(aNumber)
</font></a></b><p>
2201 <div style=
"width:40em; margin-left:2em">
2202 Sets the file position pointer to the byte specified by aNumber. Returns self.
2207 <b><a name=File-size
><font color=black
>size
</font></a></b><p>
2208 <div style=
"width:40em; margin-left:2em">
2209 Returns the file size in bytes.
2214 <b><a name=File-standardError
><font color=black
>standardError
</font></a></b><p>
2215 <div style=
"width:40em; margin-left:2em">
2216 Returns a new File whose stream is set to the standard error stream.
2221 <b><a name=File-standardInput
><font color=black
>standardInput
</font></a></b><p>
2222 <div style=
"width:40em; margin-left:2em">
2223 Returns a new File whose stream is set to the standard input stream.
2228 <b><a name=File-standardOutput
><font color=black
>standardOutput
</font></a></b><p>
2229 <div style=
"width:40em; margin-left:2em">
2230 Returns a new File whose stream is set to the standard output stream.
2235 <b><a name=File-stat
><font color=black
>stat
</font></a></b><p>
2236 <div style=
"width:40em; margin-left:2em">
2237 Updates the receiver's meta info cache.
2242 <b><a name=File-statSize
><font color=black
>statSize
</font></a></b><p>
2243 <div style=
"width:40em; margin-left:2em">
2244 Returns the file's size in bytes as a Number.
2249 <b><a name=File-temporaryFile
><font color=black
>temporaryFile
</font></a></b><p>
2250 <div style=
"width:40em; margin-left:2em">
2251 Returns a new File object with an open temporary file. The file is
2252 automatically deleted when the returned File object is closed or garbage collected.
2257 <b><a name=File-truncateToSize(numberOfBytes)
><font color=black
>truncateToSize(numberOfBytes)
</font></a></b><p>
2258 <div style=
"width:40em; margin-left:2em">
2259 Trunctates the file's size to the numberOfBytes. Returns self.
2264 <b><a name=File-userId
><font color=black
>userId
</font></a></b><p>
2265 <div style=
"width:40em; margin-left:2em">
2266 Returns a Number containing the user id associated with the file's path.
2271 <b><a name=File-with(aPath)
><font color=black
>with(aPath)
</font></a></b><p>
2272 <div style=
"width:40em; margin-left:2em">
2273 Returns a new instance with the provided path.
2278 <b><a name=File-write(aSequence1, aSequence2, ...)
><font color=black
>write(aSequence1, aSequence2, ...)
</font></a></b><p>
2279 <div style=
"width:40em; margin-left:2em">
2280 Writes the arguments to the receiver file. Returns self.
2289 <h2><a name=ImmutableSequence
><font color=black
>ImmutableSequence
</font></a></h2>
2290 <ul style=
"width:40em">
2291 <b><font color=#
000>Protos:
</font></b> Sequence
2292 <h3>Description
</h3>
2293 A Sequence is a container for a list of data elements.
2294 Immutable Sequences are also called
"Symbols".
2298 <div style=
"width:40em; margin-left:2em">
2299 <b><a href=#ImmutableSequence-..(aSequence)
>..(aSequence)
</a></b><br>
2300 <b><a href=#ImmutableSequence-afterSeq(aSequence)
>afterSeq(aSequence)
</a></b><br>
2301 <b><a href=#ImmutableSequence-asBinaryNumber
>asBinaryNumber
</a></b><br>
2302 <b><a href=#ImmutableSequence-asCapitalized
>asCapitalized
</a></b><br>
2303 <b><a href=#ImmutableSequence-asFixedSizeType
>asFixedSizeType
</a></b><br>
2304 <b><a href=#ImmutableSequence-asLowercase
>asLowercase
</a></b><br>
2305 <b><a href=#ImmutableSequence-asMessage(optionalLabel)
>asMessage(optionalLabel)
</a></b><br>
2306 <b><a href=#ImmutableSequence-asMutable
>asMutable
</a></b><br>
2307 <b><a href=#ImmutableSequence-asNumber
>asNumber
</a></b><br>
2308 <b><a href=#ImmutableSequence-asSymbol
>asSymbol
</a></b><br>
2309 <b><a href=#ImmutableSequence-asUTF16
>asUTF16
</a></b><br>
2310 <b><a href=#ImmutableSequence-asUTF32
>asUTF32
</a></b><br>
2311 <b><a href=#ImmutableSequence-asUTF8
>asUTF8
</a></b><br>
2312 <b><a href=#ImmutableSequence-asUppercase
>asUppercase
</a></b><br>
2313 <b><a href=#ImmutableSequence-at(aNumber)
>at(aNumber)
</a></b><br>
2314 <b><a href=#ImmutableSequence-beforeSeq(aSequence)
>beforeSeq(aSequence)
</a></b><br>
2315 <b><a href=#ImmutableSequence-beginsWithSeq(aSequence)
>beginsWithSeq(aSequence)
</a></b><br>
2316 <b><a href=#ImmutableSequence-between(aSequence, anotherSequence)
>between(aSequence, anotherSequence)
</a></b><br>
2317 <b><a href=#ImmutableSequence-cloneAppendPath(aSequence)
>cloneAppendPath(aSequence)
</a></b><br>
2318 <b><a href=#ImmutableSequence-contains(aNumber)
>contains(aNumber)
</a></b><br>
2319 <b><a href=#ImmutableSequence-containsAnyCaseSeq(aSequence)
>containsAnyCaseSeq(aSequence)
</a></b><br>
2320 <b><a href=#ImmutableSequence-containsSeq(aSequence)
>containsSeq(aSequence)
</a></b><br>
2321 <b><a href=#ImmutableSequence-distanceTo(aSeq)
>distanceTo(aSeq)
</a></b><br>
2322 <b><a href=#ImmutableSequence-encoding
>encoding
</a></b><br>
2323 <b><a href=#ImmutableSequence-endsWithSeq(aSequence)
>endsWithSeq(aSequence)
</a></b><br>
2324 <b><a href=#ImmutableSequence-fileName
>fileName
</a></b><br>
2325 <b><a href=#ImmutableSequence-findSeq(aSequence, optionalStartIndex)
>findSeq(aSequence, optionalStartIndex)
</a></b><br>
2326 <b><a href=#ImmutableSequence-findSeqs(listOfSequences, optionalStartIndex)
>findSeqs(listOfSequences, optionalStartIndex)
</a></b><br>
2327 <b><a href=#ImmutableSequence-foreach(optionalIndex, value, message)
>foreach(optionalIndex, value, message)
</a></b><br>
2328 <b><a href=#ImmutableSequence-fromBase(aNumber)
>fromBase(aNumber)
</a></b><br>
2329 <b><a href=#ImmutableSequence-interpolate(ctx)
>interpolate(ctx)
</a></b><br>
2330 <b><a href=#ImmutableSequence-isEmpty
>isEmpty
</a></b><br>
2331 <b><a href=#ImmutableSequence-isEqualAnyCase(aSequence)
>isEqualAnyCase(aSequence)
</a></b><br>
2332 <b><a href=#ImmutableSequence-isLowercase
>isLowercase
</a></b><br>
2333 <b><a href=#ImmutableSequence-isMutable
>isMutable
</a></b><br>
2334 <b><a href=#ImmutableSequence-isSymbol
>isSymbol
</a></b><br>
2335 <b><a href=#ImmutableSequence-isUppercase
>isUppercase
</a></b><br>
2336 <b><a href=#ImmutableSequence-isZero
>isZero
</a></b><br>
2337 <b><a href=#ImmutableSequence-itemSize
>itemSize
</a></b><br>
2338 <b><a href=#ImmutableSequence-itemType
>itemType
</a></b><br>
2339 <b><a href=#ImmutableSequence-lastPathComponent
>lastPathComponent
</a></b><br>
2340 <b><a href=#ImmutableSequence-linePrint
>linePrint
</a></b><br>
2341 <b><a href=#ImmutableSequence-occurancesOfSeq(aSeq)
>occurancesOfSeq(aSeq)
</a></b><br>
2342 <b><a href=#ImmutableSequence-pathComponent
>pathComponent
</a></b><br>
2343 <b><a href=#ImmutableSequence-pathExtension
>pathExtension
</a></b><br>
2344 <b><a href=#ImmutableSequence-print
>print
</a></b><br>
2345 <b><a href=#ImmutableSequence-reverseFindSeq(aSequence, startIndex)
>reverseFindSeq(aSequence, startIndex)
</a></b><br>
2346 <b><a href=#ImmutableSequence-size
>size
</a></b><br>
2347 <b><a href=#ImmutableSequence-slice(startIndex, endIndex)
>slice(startIndex, endIndex)
</a></b><br>
2348 <b><a href=#ImmutableSequence-split(optionalArg1, optionalArg2, ...)
>split(optionalArg1, optionalArg2, ...)
</a></b><br>
2349 <b><a href=#ImmutableSequence-splitAt(indexNumber)
>splitAt(indexNumber)
</a></b><br>
2350 <b><a href=#ImmutableSequence-toBase(aNumber)
>toBase(aNumber)
</a></b><br>
2351 <b><a href=#ImmutableSequence-whiteSpaceStrings
>whiteSpaceStrings
</a></b><br>
2352 <b><a href=#ImmutableSequence-with(aSequence, ...)
>with(aSequence, ...)
</a></b><br>
2357 <b><a name=ImmutableSequence-..(aSequence)
><font color=black
>..(aSequence)
</font></a></b><p>
2358 <div style=
"width:40em; margin-left:2em">
2359 Returns a copy of the receiver with aSequence appended to it.
2364 <b><a name=ImmutableSequence-afterSeq(aSequence)
><font color=black
>afterSeq(aSequence)
</font></a></b><p>
2365 <div style=
"width:40em; margin-left:2em">
2366 Returns the slice of the receiver (as a Symbol) after aSequence or
2367 nil if aSequence is not found. If aSequence is empty, the receiver
2368 (or a copy of the receiver if it is mutable) is returned.
2373 <b><a name=ImmutableSequence-asBinaryNumber
><font color=black
>asBinaryNumber
</font></a></b><p>
2374 <div style=
"width:40em; margin-left:2em">
2375 Returns a Number containing the first
8 bytes of the
2376 receiver without casting them to a double.
2381 <b><a name=ImmutableSequence-asCapitalized
><font color=black
>asCapitalized
</font></a></b><p>
2382 <div style=
"width:40em; margin-left:2em">
2383 Returns a copy of the receiver with the first charater made uppercase.
2388 <b><a name=ImmutableSequence-asFixedSizeType
><font color=black
>asFixedSizeType
</font></a></b><p>
2389 <div style=
"width:40em; margin-left:2em">
2390 Returns a new sequence with the receiver encoded in the
2391 minimal fixed width text encoding that it's characters can fit
2392 into (either, ascii, utf8, utf16 or utf32).
2397 <b><a name=ImmutableSequence-asLowercase
><font color=black
>asLowercase
</font></a></b><p>
2398 <div style=
"width:40em; margin-left:2em">
2399 Returns a symbol containing the reveiver made Lowercase.
2404 <b><a name=ImmutableSequence-asMessage(optionalLabel)
><font color=black
>asMessage(optionalLabel)
</font></a></b><p>
2405 <div style=
"width:40em; margin-left:2em">
2406 Returns the compiled message object for the string.
2411 <b><a name=ImmutableSequence-asMutable
><font color=black
>asMutable
</font></a></b><p>
2412 <div style=
"width:40em; margin-left:2em">
2413 Returns a mutable copy of the receiver.
2418 <b><a name=ImmutableSequence-asNumber
><font color=black
>asNumber
</font></a></b><p>
2419 <div style=
"width:40em; margin-left:2em">
2420 Returns the receiver converted to a number.
2421 Initial whitespace is ignored.
2426 <b><a name=ImmutableSequence-asSymbol
><font color=black
>asSymbol
</font></a></b><p>
2427 <div style=
"width:40em; margin-left:2em">
2428 Returns a immutable Sequence (aka Symbol) version of the receiver.
2433 <b><a name=ImmutableSequence-asUTF16
><font color=black
>asUTF16
</font></a></b><p>
2434 <div style=
"width:40em; margin-left:2em">
2435 Returns a new copy of the receiver converted to utf16 encoding.
2440 <b><a name=ImmutableSequence-asUTF32
><font color=black
>asUTF32
</font></a></b><p>
2441 <div style=
"width:40em; margin-left:2em">
2442 Returns a new copy of the receiver converted to utf32 encoding.
2447 <b><a name=ImmutableSequence-asUTF8
><font color=black
>asUTF8
</font></a></b><p>
2448 <div style=
"width:40em; margin-left:2em">
2449 Returns a new copy of the receiver converted to utf8 encoding.
2454 <b><a name=ImmutableSequence-asUppercase
><font color=black
>asUppercase
</font></a></b><p>
2455 <div style=
"width:40em; margin-left:2em">
2456 Returns a symbol containing the reveiver made uppercase.
2461 <b><a name=ImmutableSequence-at(aNumber)
><font color=black
>at(aNumber)
</font></a></b><p>
2462 <div style=
"width:40em; margin-left:2em">
2463 Returns a value at the index specified by aNumber.
2464 Returns nil if the index is out of bounds.
2469 <b><a name=ImmutableSequence-beforeSeq(aSequence)
><font color=black
>beforeSeq(aSequence)
</font></a></b><p>
2470 <div style=
"width:40em; margin-left:2em">
2471 Returns the slice of the receiver (as a Symbol) before
2472 aSequence or self if aSequence is not found.
2477 <b><a name=ImmutableSequence-beginsWithSeq(aSequence)
><font color=black
>beginsWithSeq(aSequence)
</font></a></b><p>
2478 <div style=
"width:40em; margin-left:2em">
2479 Returns true if the receiver begins with aSequence, false otherwise.
2484 <b><a name=ImmutableSequence-between(aSequence, anotherSequence)
><font color=black
>between(aSequence, anotherSequence)
</font></a></b><p>
2485 <div style=
"width:40em; margin-left:2em">
2486 Returns a new Sequence containing the bytes between the
2487 occurance of aSequence and anotherSequence in the receiver.
2492 <b><a name=ImmutableSequence-cloneAppendPath(aSequence)
><font color=black
>cloneAppendPath(aSequence)
</font></a></b><p>
2493 <div style=
"width:40em; margin-left:2em">
2494 Appends argument to a copy the receiver such that there is one
2495 and only one path separator between the two and returns the result.
2500 <b><a name=ImmutableSequence-contains(aNumber)
><font color=black
>contains(aNumber)
</font></a></b><p>
2501 <div style=
"width:40em; margin-left:2em">
2502 Returns true if the receiver contains an element equal in value to aNumber, false otherwise.
2507 <b><a name=ImmutableSequence-containsAnyCaseSeq(aSequence)
><font color=black
>containsAnyCaseSeq(aSequence)
</font></a></b><p>
2508 <div style=
"width:40em; margin-left:2em">
2509 Returns true if the receiver contains the aSequence
2510 regardless of casing, false otherwise.
2515 <b><a name=ImmutableSequence-containsSeq(aSequence)
><font color=black
>containsSeq(aSequence)
</font></a></b><p>
2516 <div style=
"width:40em; margin-left:2em">
2517 Returns true if the receiver contains the substring
2518 aSequence, false otherwise.
2523 <b><a name=ImmutableSequence-distanceTo(aSeq)
><font color=black
>distanceTo(aSeq)
</font></a></b><p>
2524 <div style=
"width:40em; margin-left:2em">
2525 Returns a number with the square root of the sum of the square
2526 of the differences of the items between the sequences.
2531 <b><a name=ImmutableSequence-encoding
><font color=black
>encoding
</font></a></b><p>
2532 <div style=
"width:40em; margin-left:2em">
2533 Returns the encoding of the elements.
2538 <b><a name=ImmutableSequence-endsWithSeq(aSequence)
><font color=black
>endsWithSeq(aSequence)
</font></a></b><p>
2539 <div style=
"width:40em; margin-left:2em">
2540 Returns true if the receiver ends with aSequence, false otherwise.
2545 <b><a name=ImmutableSequence-fileName
><font color=black
>fileName
</font></a></b><p>
2546 <div style=
"width:40em; margin-left:2em">
2547 Returns the last path component sans the path extension.
2552 <b><a name=ImmutableSequence-findSeq(aSequence, optionalStartIndex)
><font color=black
>findSeq(aSequence, optionalStartIndex)
</font></a></b><p>
2553 <div style=
"width:40em; margin-left:2em">
2554 Returns a number with the first occurrence of aSequence in
2555 the receiver after the startIndex. If no startIndex is specified,
2556 the search starts at index
0.
2557 nil is returned if no occurences are found.
2562 <b><a name=ImmutableSequence-findSeqs(listOfSequences, optionalStartIndex)
><font color=black
>findSeqs(listOfSequences, optionalStartIndex)
</font></a></b><p>
2563 <div style=
"width:40em; margin-left:2em">
2564 Returns a object with two slots - an \
"index\" slot which contains
2565 the first occurrence of any of the sequences in listOfSequences found
2566 in the receiver after the startIndex, and a \
"match\" slot, which
2567 contains a reference to the matching sequence from listOfSequences.
2568 If no startIndex is specified, the search starts at index
0.
2569 nil is returned if no occurences are found.
2574 <b><a name=ImmutableSequence-foreach(optionalIndex, value, message)
><font color=black
>foreach(optionalIndex, value, message)
</font></a></b><p>
2575 <div style=
"width:40em; margin-left:2em">
2576 For each element, set index to the index of the
2577 element and value the element value and execute message. Example:
2579 aSequence foreach(i, v, writeln(
"value at index ", i,
" is ", v))
2580 aSequence foreach(v, writeln(
"value ", v))
2586 <b><a name=ImmutableSequence-fromBase(aNumber)
><font color=black
>fromBase(aNumber)
</font></a></b><p>
2587 <div style=
"width:40em; margin-left:2em">
2588 Returns a number with a base
10 representation of the receiver
2589 converted from the specified base. Only base
2 through
32 are currently supported.
2594 <b><a name=ImmutableSequence-interpolate(ctx)
><font color=black
>interpolate(ctx)
</font></a></b><p>
2595 <div style=
"width:40em; margin-left:2em">
2596 Returns immutable copy of self with interpolateInPlace(ctx) passed to the copy.
2601 <b><a name=ImmutableSequence-isEmpty
><font color=black
>isEmpty
</font></a></b><p>
2602 <div style=
"width:40em; margin-left:2em">
2603 Returns true if the size of the receiver is
0, false otherwise.
2608 <b><a name=ImmutableSequence-isEqualAnyCase(aSequence)
><font color=black
>isEqualAnyCase(aSequence)
</font></a></b><p>
2609 <div style=
"width:40em; margin-left:2em">
2610 Returns true if aSequence is equal to the receiver
2611 ignoring case differences, false otherwise.
2616 <b><a name=ImmutableSequence-isLowercase
><font color=black
>isLowercase
</font></a></b><p>
2617 <div style=
"width:40em; margin-left:2em">
2618 Returns self if all the characters in the string are lower case.
2623 <b><a name=ImmutableSequence-isMutable
><font color=black
>isMutable
</font></a></b><p>
2624 <div style=
"width:40em; margin-left:2em">
2625 Returns true if the receiver is a mutable Sequence or false otherwise.
2630 <b><a name=ImmutableSequence-isSymbol
><font color=black
>isSymbol
</font></a></b><p>
2631 <div style=
"width:40em; margin-left:2em">
2632 Returns true if the receiver is a
2633 immutable Sequence (aka, a Symbol) or false otherwise.
2638 <b><a name=ImmutableSequence-isUppercase
><font color=black
>isUppercase
</font></a></b><p>
2639 <div style=
"width:40em; margin-left:2em">
2640 Returns self if all the characters in the string are upper case.
2645 <b><a name=ImmutableSequence-isZero
><font color=black
>isZero
</font></a></b><p>
2646 <div style=
"width:40em; margin-left:2em">
2647 Returns true if all elements are
0, false otherwise.
2652 <b><a name=ImmutableSequence-itemSize
><font color=black
>itemSize
</font></a></b><p>
2653 <div style=
"width:40em; margin-left:2em">
2654 Returns number of bytes in each element.
2659 <b><a name=ImmutableSequence-itemType
><font color=black
>itemType
</font></a></b><p>
2660 <div style=
"width:40em; margin-left:2em">
2661 Returns machine type of elements.
2666 <b><a name=ImmutableSequence-lastPathComponent
><font color=black
>lastPathComponent
</font></a></b><p>
2667 <div style=
"width:40em; margin-left:2em">
2668 Returns a string containing the receiver clipped up
2669 to the last path separator.
2674 <b><a name=ImmutableSequence-linePrint
><font color=black
>linePrint
</font></a></b><p>
2675 <div style=
"width:40em; margin-left:2em">
2676 Prints the Sequence and a newline character.
2681 <b><a name=ImmutableSequence-occurancesOfSeq(aSeq)
><font color=black
>occurancesOfSeq(aSeq)
</font></a></b><p>
2682 <div style=
"width:40em; margin-left:2em">
2683 Returns count of aSeq in the receiver.
2688 <b><a name=ImmutableSequence-pathComponent
><font color=black
>pathComponent
</font></a></b><p>
2689 <div style=
"width:40em; margin-left:2em">
2690 Returns a slice of the receiver before the last path separator as a symbol.
2695 <b><a name=ImmutableSequence-pathExtension
><font color=black
>pathExtension
</font></a></b><p>
2696 <div style=
"width:40em; margin-left:2em">
2697 Returns a string containing the receiver clipped up to the last period.
2702 <b><a name=ImmutableSequence-print
><font color=black
>print
</font></a></b><p>
2703 <div style=
"width:40em; margin-left:2em">
2704 Prints the receiver as a string. Returns self.
2709 <b><a name=ImmutableSequence-reverseFindSeq(aSequence, startIndex)
><font color=black
>reverseFindSeq(aSequence, startIndex)
</font></a></b><p>
2710 <div style=
"width:40em; margin-left:2em">
2711 Returns a number with the first occurrence of aSequence in
2712 the receiver before the startIndex. The startIndex argument is optional.
2713 By default reverseFind starts at the end of the string. Nil is
2714 returned if no occurrences are found.
2719 <b><a name=ImmutableSequence-size
><font color=black
>size
</font></a></b><p>
2720 <div style=
"width:40em; margin-left:2em">
2721 Returns the length in bytes of the receiver. For example,
2729 <b><a name=ImmutableSequence-slice(startIndex, endIndex)
><font color=black
>slice(startIndex, endIndex)
</font></a></b><p>
2730 <div style=
"width:40em; margin-left:2em">
2731 Returns a new string containing the subset of the
2732 receiver from the startIndex to the endIndex. The endIndex argument
2733 is optional. If not given, it is assumed to be the end of the string.
2738 <b><a name=ImmutableSequence-split(optionalArg1, optionalArg2, ...)
><font color=black
>split(optionalArg1, optionalArg2, ...)
</font></a></b><p>
2739 <div style=
"width:40em; margin-left:2em">
2740 Returns a list containing the sub-sequences of the receiver divided by the given arguments.
2741 If no arguments are given the sequence is split on white space.
2744 "a b c d" split == list(
"a",
"b",
"c",
"d")
2745 "a*b*c*d" split(
"*") == list(
"a",
"b",
"c",
"d")
2746 "a*b|c,d" split(
"*",
"|",
",") == list(
"a",
"b",
"c",
"d")
2747 "a b c d" split == list(
"a",
"",
"",
"",
"b",
"",
"",
"c",
"",
"d")
2753 <b><a name=ImmutableSequence-splitAt(indexNumber)
><font color=black
>splitAt(indexNumber)
</font></a></b><p>
2754 <div style=
"width:40em; margin-left:2em">
2755 Returns a list containing the two parts of the receiver as split at the given index.
2760 <b><a name=ImmutableSequence-toBase(aNumber)
><font color=black
>toBase(aNumber)
</font></a></b><p>
2761 <div style=
"width:40em; margin-left:2em">
2762 Returns a Sequence containing the receiver(which is
2763 assumed to be a base
10 number) converted to the specified base.
2764 Only base
8 and
16 are currently supported.
2769 <b><a name=ImmutableSequence-whiteSpaceStrings
><font color=black
>whiteSpaceStrings
</font></a></b><p>
2770 <div style=
"width:40em; margin-left:2em">
2771 Returns a List of strings. Each string contains a different
2772 whitespace character.
2777 <b><a name=ImmutableSequence-with(aSequence, ...)
><font color=black
>with(aSequence, ...)
</font></a></b><p>
2778 <div style=
"width:40em; margin-left:2em">
2779 Returns a new Sequence which is the concatination of the arguments.
2780 The returned sequence will have the same mutability status as the receiver.
2789 <h2><a name=Importer
><font color=black
>Importer
</font></a></h2>
2790 <ul style=
"width:40em">
2791 <b><font color=#
000>Protos:
</font></b> Object
2793 <div style=
"width:40em; margin-left:2em">
2794 <b><a href=#Importer-AddonImporter
>AddonImporter
</a></b><br>
2795 <b><a href=#Importer-FileImporter
>FileImporter
</a></b><br>
2796 <b><a href=#Importer-addSearchPath(path)
>addSearchPath(path)
</a></b><br>
2797 <b><a href=#Importer-autoImportingForward
>autoImportingForward
</a></b><br>
2798 <b><a href=#Importer-import(originalCallMessage)
>import(originalCallMessage)
</a></b><br>
2799 <b><a href=#Importer-importers
>importers
</a></b><br>
2800 <b><a href=#Importer-paths
>paths
</a></b><br>
2801 <b><a href=#Importer-removeSearchPath(path)
>removeSearchPath(path)
</a></b><br>
2802 <b><a href=#Importer-turnOff
>turnOff
</a></b><br>
2803 <b><a href=#Importer-turnOn
>turnOn
</a></b><br>
2808 <b><a name=Importer-AddonImporter
><font color=black
>AddonImporter
</font></a></b><p>
2809 <div style=
"width:40em; margin-left:2em">
2810 An Importer for addon modules.
2815 <b><a name=Importer-FileImporter
><font color=black
>FileImporter
</font></a></b><p>
2816 <div style=
"width:40em; margin-left:2em">
2817 An Importer for local source files.
2822 <b><a name=Importer-addSearchPath(path)
><font color=black
>addSearchPath(path)
</font></a></b><p>
2823 <div style=
"width:40em; margin-left:2em">
2824 Add a search path to the auto importer. Relative paths are made absolute before adding.
2829 <b><a name=Importer-autoImportingForward
><font color=black
>autoImportingForward
</font></a></b><p>
2830 <div style=
"width:40em; margin-left:2em">
2831 A forward method implementation placed in the Lobby when Importing is turned on.
2836 <b><a name=Importer-import(originalCallMessage)
><font color=black
>import(originalCallMessage)
</font></a></b><p>
2837 <div style=
"width:40em; margin-left:2em">
2838 Imports an object or addon for the given Message.
2843 <b><a name=Importer-importers
><font color=black
>importers
</font></a></b><p>
2844 <div style=
"width:40em; margin-left:2em">
2845 List of Importer objects.
2850 <b><a name=Importer-paths
><font color=black
>paths
</font></a></b><p>
2851 <div style=
"width:40em; margin-left:2em">
2852 List of paths the proto importer will check while searching for protos to load.
2857 <b><a name=Importer-removeSearchPath(path)
><font color=black
>removeSearchPath(path)
</font></a></b><p>
2858 <div style=
"width:40em; margin-left:2em">
2859 Removes a search path from the auto importer. Relative paths should be removed from the same working directory as they were added.
2864 <b><a name=Importer-turnOff
><font color=black
>turnOff
</font></a></b><p>
2865 <div style=
"width:40em; margin-left:2em">
2866 Turns off the Importer. Returns self.
2871 <b><a name=Importer-turnOn
><font color=black
>turnOn
</font></a></b><p>
2872 <div style=
"width:40em; margin-left:2em">
2873 Turns on the Importer. Returns self.
2882 <h2><a name=List
><font color=black
>List
</font></a></h2>
2883 <ul style=
"width:40em">
2884 <b><font color=#
000>Protos:
</font></b> Object
2885 <h3>Description
</h3>
2886 A mutable array of values. The first index is
0.
")
2890 <div style="width:
40em; margin-left:
2em
">
2891 <b><a href=#List-anyOne >anyOne </a></b><br>
2892 <b><a href=#List-append(anObject1, anObject2, ...) >append(anObject1, anObject2, ...)</a></b><br>
2893 <b><a href=#List-appendIfAbsent(anObject) >appendIfAbsent(anObject)</a></b><br>
2894 <b><a href=#List-appendSeq(aList1, aList2, ...) >appendSeq(aList1, aList2, ...)</a></b><br>
2895 <b><a href=#List-asMap >asMap </a></b><br>
2896 <b><a href=#List-asMessage Converts each element in the list to unnamed messages >asMessage Converts each element in the list to unnamed messages </a></b><br>
2897 <b><a href=#List-at(index) >at(index)</a></b><br>
2898 <b><a href=#List-atInsert(index, anObject) >atInsert(index, anObject)</a></b><br>
2899 <b><a href=#List-atPut(index, anObject) >atPut(index, anObject)</a></b><br>
2900 <b><a href=#List-average >average </a></b><br>
2901 <b><a href=#List-capacity >capacity</a></b><br>
2902 <b><a href=#List-contains(anObject) >contains(anObject)</a></b><br>
2903 <b><a href=#List-containsAll(list) >containsAll(list)</a></b><br>
2904 <b><a href=#List-containsAny(list) >containsAny(list)</a></b><br>
2905 <b><a href=#List-containsIdenticalTo(anObject) >containsIdenticalTo(anObject)</a></b><br>
2906 <b><a href=#List-cusor >cusor </a></b><br>
2907 <b><a href=#List-detect(optionalIndex, value, message) >detect(optionalIndex, value, message)</a></b><br>
2908 <b><a href=#List-difference(list) >difference(list)</a></b><br>
2909 <b><a href=#List-empty >empty</a></b><br>
2910 <b><a href=#List-first(optionalSize) >first(optionalSize)</a></b><br>
2911 <b><a href=#List-flatten >flatten </a></b><br>
2912 <b><a href=#List-foreach(optionalIndex, value, message) >foreach(optionalIndex, value, message)</a></b><br>
2913 <b><a href=#List-indexOf(anObject) >indexOf(anObject)</a></b><br>
2914 <b><a href=#List-insertAfter(item, afterItem) >insertAfter(item, afterItem) </a></b><br>
2915 <b><a href=#List-insertAt(item, index) >insertAt(item, index)</a></b><br>
2916 <b><a href=#List-insertBefore(item, beforeItem) >insertBefore(item, beforeItem)</a></b><br>
2917 <b><a href=#List-intersect(list) >intersect(list)</a></b><br>
2918 <b><a href=#List-join(optionalString) >join(optionalString) </a></b><br>
2919 <b><a href=#List-last(optionalSize) >last(optionalSize)</a></b><br>
2920 <b><a href=#List-map(optionalIndex, value, message) >map(optionalIndex, value, message)</a></b><br>
2921 <b><a href=#List-pop >pop</a></b><br>
2922 <b><a href=#List-preallocateToSize(aNumber) >preallocateToSize(aNumber)</a></b><br>
2923 <b><a href=#List-prepend(anObject1, anObject2, ...) >prepend(anObject1, anObject2, ...)</a></b><br>
2924 <b><a href=#List-push(anObject1, anObject2, ...) >push(anObject1, anObject2, ...)</a></b><br>
2925 <b><a href=#List-reduce >reduce </a></b><br>
2926 <b><a href=#List-remove(anObject, ...) >remove(anObject, ...)</a></b><br>
2927 <b><a href=#List-removeAt(index) >removeAt(index)</a></b><br>
2928 <b><a href=#List-removeFirst >removeFirst </a></b><br>
2929 <b><a href=#List-removeLast >removeLast </a></b><br>
2930 <b><a href=#List-removeSeq >removeSeq </a></b><br>
2931 <b><a href=#List-reverse >reverse</a></b><br>
2932 <b><a href=#List-reverseForeach(index, value, message) >reverseForeach(index, value, message)</a></b><br>
2933 <b><a href=#List-reverseReduce >reverseReduce </a></b><br>
2934 <b><a href=#List-select(optionalIndex, value, message)",
>select(optionalIndex, value, message)
",</a></b><br>
2935 <b><a href=#List-setSize >setSize</a></b><br>
2936 <b><a href=#List-shuffle >shuffle </a></b><br>
2937 <b><a href=#List-size >size</a></b><br>
2938 <b><a href=#List-slice(startIndex, endIndex) >slice(startIndex, endIndex)</a></b><br>
2939 <b><a href=#List-sliceInPlace(startIndex, endIndex) >sliceInPlace(startIndex, endIndex)</a></b><br>
2940 <b><a href=#List-sortBy(aBlock) >sortBy(aBlock)</a></b><br>
2941 <b><a href=#List-sortInPlace(optionalExpression) >sortInPlace(optionalExpression)</a></b><br>
2942 <b><a href=#List-sum >sum </a></b><br>
2943 <b><a href=#List-swapIndices(index1, index2) >swapIndices(index1, index2)</a></b><br>
2944 <b><a href=#List-union(list) >union(list)</a></b><br>
2945 <b><a href=#List-unique >unique </a></b><br>
2946 <b><a href=#List-uniqueCount >uniqueCount </a></b><br>
2947 <b><a href=#List-with(anObject, ...) >with(anObject, ...)</a></b><br>
2952 <b><a name=List-anyOne ><font color=black>anyOne </font></a></b><p>
2953 <div style="width:
40em; margin-left:
2em
">
2954 Returns a random element of the receiver or nil if the receiver is empty.
2959 <b><a name=List-append(anObject1, anObject2, ...)><font color=black>append(anObject1, anObject2, ...)</font></a></b><p>
2960 <div style="width:
40em; margin-left:
2em
">
2961 Appends the arguments to the end of the list. Returns self.
2966 <b><a name=List-appendIfAbsent(anObject)><font color=black>appendIfAbsent(anObject)</font></a></b><p>
2967 <div style="width:
40em; margin-left:
2em
">
2968 Adds each value not already contained by the receiver, returns self.
2973 <b><a name=List-appendSeq(aList1, aList2, ...)><font color=black>appendSeq(aList1, aList2, ...)</font></a></b><p>
2974 <div style="width:
40em; margin-left:
2em
">
2975 Add the items in the lists to the receiver. Returns self.
2980 <b><a name=List-asMap ><font color=black>asMap </font></a></b><p>
2981 <div style="width:
40em; margin-left:
2em
">
2982 The reverse of Map asList: converts a list of lists (key-value pairs) into a Map. The first item of each pair list must be a sequence. The second item is the value.
2987 <b><a name=List-asMessage Converts each element in the list to unnamed messages ><font color=black>asMessage Converts each element in the list to unnamed messages </font></a></b><p>
2988 <div style="width:
40em; margin-left:
2em
">
2989 with their cached result set to the value of the element (without activating).
2990 Returns an unnamed message whose arguments map 1:1 with the elements (after being converted to messages themselves).
2995 <b><a name=List-at(index)><font color=black>at(index)</font></a></b><p>
2996 <div style="width:
40em; margin-left:
2em
">
2997 Returns the value at index. Returns Nil if the index is out of bounds.
3002 <b><a name=List-atInsert(index, anObject)><font color=black>atInsert(index, anObject)</font></a></b><p>
3003 <div style="width:
40em; margin-left:
2em
">
3004 Inserts anObject at the index specified by index.
3005 Adds anObject if the index equals the current count of the receiver.
3006 Raises an exception if the index is out of bounds. Returns self.
3011 <b><a name=List-atPut(index, anObject)><font color=black>atPut(index, anObject)</font></a></b><p>
3012 <div style="width:
40em; margin-left:
2em
">
3013 Replaces the existing value at index with anObject.
3014 Raises an exception if the index is out of bounds. Returns self.
3019 <b><a name=List-average ><font color=black>average </font></a></b><p>
3020 <div style="width:
40em; margin-left:
2em
">
3021 Returns the average of the items.
3026 <b><a name=List-capacity><font color=black>capacity</font></a></b><p>
3027 <div style="width:
40em; margin-left:
2em
">
3028 Returns the number of potential elements the receiver can hold before it needs to grow.
3033 <b><a name=List-contains(anObject)><font color=black>contains(anObject)</font></a></b><p>
3034 <div style="width:
40em; margin-left:
2em
">
3035 Returns true if the receiver contains anObject, otherwise returns false.
3040 <b><a name=List-containsAll(list)><font color=black>containsAll(list)</font></a></b><p>
3041 <div style="width:
40em; margin-left:
2em
">
3042 Returns true the target contains all of the items in the argument list.
3047 <b><a name=List-containsAny(list)><font color=black>containsAny(list)</font></a></b><p>
3048 <div style="width:
40em; margin-left:
2em
">
3049 Returns true the target contains any of the items in the argument list.
3054 <b><a name=List-containsIdenticalTo(anObject)><font color=black>containsIdenticalTo(anObject)</font></a></b><p>
3055 <div style="width:
40em; margin-left:
2em
">
3056 Returns true if the receiver contains a value identical to anObject, otherwise returns false.
3061 <b><a name=List-cusor ><font color=black>cusor </font></a></b><p>
3062 <div style="width:
40em; margin-left:
2em
">
3063 Returns a ListCursor for the receiver.
3068 <b><a name=List-detect(optionalIndex, value, message)><font color=black>detect(optionalIndex, value, message)</font></a></b><p>
3069 <div style="width:
40em; margin-left:
2em
">
3070 Returns the first value for which the message evaluates to a non-nil. Example:
3071 <code>list(1, 2, 3, 4) detect(i, v, v > 2)
3074 list(1, 2, 3, 4) detect(v, v > 2)
3080 <b><a name=List-difference(list)><font color=black>difference(list)</font></a></b><p>
3081 <div style="width:
40em; margin-left:
2em
">
3082 Returns a new list containing items from the target list which aren't in the argument list.
3087 <b><a name=List-empty><font color=black>empty</font></a></b><p>
3088 <div style="width:
40em; margin-left:
2em
">
3089 Removes all items from the receiver.
3094 <b><a name=List-first(optionalSize)><font color=black>first(optionalSize)</font></a></b><p>
3095 <div style="width:
40em; margin-left:
2em
">
3096 Returns the first item or Nil if the list is empty.
3097 If optionalSize is provided, that number of the first items in the list are returned.
3102 <b><a name=List-flatten ><font color=black>flatten </font></a></b><p>
3103 <div style="width:
40em; margin-left:
2em
">
3104 Creates a new list, with all contained lists flattened into the new list. For example:
3106 list(1,2,list(3,4,list(5))) flatten
3107 ==> list(1, 2, 3, 4, 5)
3113 <b><a name=List-foreach(optionalIndex, value, message)><font color=black>foreach(optionalIndex, value, message)</font></a></b><p>
3114 <div style="width:
40em; margin-left:
2em
">
3115 Loops over the list values setting the specified index and
3116 value slots and executing the message. Returns the result of the last
3117 execution of the message. Example:
3120 list(1, 2, 3) foreach(i, v, writeln(i, " =
", v))
3121 list(1, 2, 3) foreach(v, writeln(v))</code>
3126 <b><a name=List-indexOf(anObject)><font color=black>indexOf(anObject)</font></a></b><p>
3127 <div style="width:
40em; margin-left:
2em
">
3128 Returns the index of the first occurrence of anObject
3129 in the receiver. Returns Nil if the receiver doesn't contain anObject.
3134 <b><a name=List-insertAfter(item, afterItem) ><font color=black>insertAfter(item, afterItem) </font></a></b><p>
3135 <div style="width:
40em; margin-left:
2em
">
3136 Inserts item after first occurance of afterItem and returns self.
3137 If afterItem is not found, item is appended to the end of the list.
3142 <b><a name=List-insertAt(item, index)><font color=black>insertAt(item, index)</font></a></b><p>
3143 <div style="width:
40em; margin-left:
2em
">
3144 Inserts item at the specified index. Raises an exception if the index is out of bounds. Returns self.
3149 <b><a name=List-insertBefore(item, beforeItem)><font color=black>insertBefore(item, beforeItem)</font></a></b><p>
3150 <div style="width:
40em; margin-left:
2em
">
3151 Inserts item before first occurance of beforeItem or to the end of the list if beforeItem is not found. Returns self.
3156 <b><a name=List-intersect(list)><font color=black>intersect(list)</font></a></b><p>
3157 <div style="width:
40em; margin-left:
2em
">
3158 Returns a new list containing the common values from the target and argument lists.
3163 <b><a name=List-join(optionalString) ><font color=black>join(optionalString) </font></a></b><p>
3164 <div style="width:
40em; margin-left:
2em
">
3165 Returns a Sequence of the concatenated items with
3166 optionalString between each item or simply the concatenation of the items if no optionalString is supplied.
3171 <b><a name=List-last(optionalSize)><font color=black>last(optionalSize)</font></a></b><p>
3172 <div style="width:
40em; margin-left:
2em
">
3173 Returns the last item or Nil if the list is empty.
3174 If optionalSize is provided, that number of the last items in the list are returned.
3179 <b><a name=List-map(optionalIndex, value, message)><font color=black>map(optionalIndex, value, message)</font></a></b><p>
3180 <div style="width:
40em; margin-left:
2em
">
3181 Same as calling mapInPlace() on a clone of the receiver, but more efficient.
3186 <b><a name=List-pop><font color=black>pop</font></a></b><p>
3187 <div style="width:
40em; margin-left:
2em
">
3188 Returns the last item in the list and removes it
3189 from the receiver. Returns nil if the receiver is empty.
3194 <b><a name=List-preallocateToSize(aNumber)><font color=black>preallocateToSize(aNumber)</font></a></b><p>
3195 <div style="width:
40em; margin-left:
2em
">
3196 Preallocates array memory to hold aNumber number of items.
3201 <b><a name=List-prepend(anObject1, anObject2, ...)><font color=black>prepend(anObject1, anObject2, ...)</font></a></b><p>
3202 <div style="width:
40em; margin-left:
2em
">
3203 Inserts the values at the beginning of the list. Returns self.
3208 <b><a name=List-push(anObject1, anObject2, ...)><font color=black>push(anObject1, anObject2, ...)</font></a></b><p>
3209 <div style="width:
40em; margin-left:
2em
">
3210 Same as add(anObject1, anObject2, ...).
3215 <b><a name=List-reduce ><font color=black>reduce </font></a></b><p>
3216 <div style="width:
40em; margin-left:
2em
">
3217 Also known as foldl or inject. Combines values in target start on the left. reduce(+) or reduce(x, y, x + y).
3222 <b><a name=List-remove(anObject, ...)><font color=black>remove(anObject, ...)</font></a></b><p>
3223 <div style="width:
40em; margin-left:
2em
">
3224 Removes all occurrences of the arguments from the receiver. Returns self.
3229 <b><a name=List-removeAt(index)><font color=black>removeAt(index)</font></a></b><p>
3230 <div style="width:
40em; margin-left:
2em
">
3231 Removes the item at the specified index and returns the value removed.
3232 Raises an exception if the index is out of bounds.
3237 <b><a name=List-removeFirst ><font color=black>removeFirst </font></a></b><p>
3238 <div style="width:
40em; margin-left:
2em
">
3239 Returns the first item and removes it from the list. nil is returned if the list is empty.
3244 <b><a name=List-removeLast ><font color=black>removeLast </font></a></b><p>
3245 <div style="width:
40em; margin-left:
2em
">
3246 Returns the last item and removes it from the list. nil is returned if the list is empty.
3251 <b><a name=List-removeSeq ><font color=black>removeSeq </font></a></b><p>
3252 <div style="width:
40em; margin-left:
2em
">
3253 Removes each of the items from the current list which are contained in the sequence passed in.
3258 <b><a name=List-reverse><font color=black>reverse</font></a></b><p>
3259 <div style="width:
40em; margin-left:
2em
">
3260 Reverses the ordering of all the items in the receiver. Returns self.
3265 <b><a name=List-reverseForeach(index, value, message)><font color=black>reverseForeach(index, value, message)</font></a></b><p>
3266 <div style="width:
40em; margin-left:
2em
">
3267 Same as foreach, but in reverse order.
3272 <b><a name=List-reverseReduce ><font color=black>reverseReduce </font></a></b><p>
3273 <div style="width:
40em; margin-left:
2em
">
3274 Also known as foldr and inject. Combines values in target starting on the right. reverseReduce(+) or reverseReduce(x, y, x + y).
3279 <b><a name=List-select(optionalIndex, value, message)",
><font color=black
>select(optionalIndex, value, message)
",</font></a></b><p>
3280 <div style="width:
40em; margin-left:
2em
">
3281 "Like foreach, but the values for which the result of
3282 message are non-nil are returned in a new List. Example:
3283 <code>list(
1,
5,
7,
2) select(i, v, v
> 3) print
3286 list(
1,
5,
7,
2) select(v, v
> 3) print
3292 <b><a name=List-setSize
><font color=black
>setSize
</font></a></b><p>
3293 <div style=
"width:40em; margin-left:2em">
3294 Sets the size of the receiver by either removing excess items or adding nils as needed.
3299 <b><a name=List-shuffle
><font color=black
>shuffle
</font></a></b><p>
3300 <div style=
"width:40em; margin-left:2em">
3301 Randomizes the order of the elements in the receiver. Returns self.
3306 <b><a name=List-size
><font color=black
>size
</font></a></b><p>
3307 <div style=
"width:40em; margin-left:2em">
3308 Returns the number of items in the receiver.
3313 <b><a name=List-slice(startIndex, endIndex)
><font color=black
>slice(startIndex, endIndex)
</font></a></b><p>
3314 <div style=
"width:40em; margin-left:2em">
3315 Returns a new string containing the subset of the
3316 receiver from the startIndex to the endIndex. The endIndex argument
3317 is optional. If not given, it is assumed to be the end of the string.
3322 <b><a name=List-sliceInPlace(startIndex, endIndex)
><font color=black
>sliceInPlace(startIndex, endIndex)
</font></a></b><p>
3323 <div style=
"width:40em; margin-left:2em">
3324 Returns the receiver containing the subset of the
3325 receiver from the startIndex to the endIndex. The endIndex argument
3326 is optional. If not given, it is assumed to be the end of the string.
3331 <b><a name=List-sortBy(aBlock)
><font color=black
>sortBy(aBlock)
</font></a></b><p>
3332 <div style=
"width:40em; margin-left:2em">
3333 Sort the list using aBlock as the compare function. Returns self.
3338 <b><a name=List-sortInPlace(optionalExpression)
><font color=black
>sortInPlace(optionalExpression)
</font></a></b><p>
3339 <div style=
"width:40em; margin-left:2em">
3340 Sorts the list using the compare method on the items. Returns self.
3341 If an optionalExpression is provided, the sort is done on the result of the evaluation
3342 of the optionalExpression on each value.
3347 <b><a name=List-sum
><font color=black
>sum
</font></a></b><p>
3348 <div style=
"width:40em; margin-left:2em">
3349 Returns the sum of the items.
3354 <b><a name=List-swapIndices(index1, index2)
><font color=black
>swapIndices(index1, index2)
</font></a></b><p>
3355 <div style=
"width:40em; margin-left:2em">
3356 Exchanges the object at index1 with the object at index2.
3357 Raises an exception if either index is out of bounds. Returns self.
3362 <b><a name=List-union(list)
><font color=black
>union(list)
</font></a></b><p>
3363 <div style=
"width:40em; margin-left:2em">
3364 Returns a new list containing items from the target and items which are only in the argument list.
3369 <b><a name=List-unique
><font color=black
>unique
</font></a></b><p>
3370 <div style=
"width:40em; margin-left:2em">
3371 Returns a new list containing all the values in the target, but no duplicates.
3376 <b><a name=List-uniqueCount
><font color=black
>uniqueCount
</font></a></b><p>
3377 <div style=
"width:40em; margin-left:2em">
3378 Returns a list of list(value, count) for each unique value in self.
3383 <b><a name=List-with(anObject, ...)
><font color=black
>with(anObject, ...)
</font></a></b><p>
3384 <div style=
"width:40em; margin-left:2em">
3385 Returns a new List containing the arguments.
3394 <h2><a name=Map
><font color=black
>Map
</font></a></h2>
3395 <ul style=
"width:40em">
3396 <b><font color=#
000>Protos:
</font></b> Object
3397 <h3>Description
</h3>
3398 A key/value dictionary appropriate for holding large key/value collections.
3402 <div style=
"width:40em; margin-left:2em">
3403 <b><a href=#Map-asList
>asList
</a></b><br>
3404 <b><a href=#Map-at(keyString, optionalDefaultValue)
>at(keyString, optionalDefaultValue)
</a></b><br>
3405 <b><a href=#Map-atIfAbsentPut(keyString, aValue)
>atIfAbsentPut(keyString, aValue)
</a></b><br>
3406 <b><a href=#Map-atPut(keyString, aValue)
>atPut(keyString, aValue)
</a></b><br>
3407 <b><a href=#Map-empty
>empty
</a></b><br>
3408 <b><a href=#Map-foreach(optionalKey, value, message)
>foreach(optionalKey, value, message)
</a></b><br>
3409 <b><a href=#Map-hasKey(keyString)
>hasKey(keyString)
</a></b><br>
3410 <b><a href=#Map-hasValue(aValue)
>hasValue(aValue)
</a></b><br>
3411 <b><a href=#Map-keys
>keys
</a></b><br>
3412 <b><a href=#Map-removeAt(keyString)
>removeAt(keyString)
</a></b><br>
3413 <b><a href=#Map-size
>size
</a></b><br>
3414 <b><a href=#Map-values
>values
</a></b><br>
3419 <b><a name=Map-asList
><font color=black
>asList
</font></a></b><p>
3420 <div style=
"width:40em; margin-left:2em">
3421 Converts a Map to a list of lists. Each element in the returned list will be a list of two elements: the key, and the value.
3426 <b><a name=Map-at(keyString, optionalDefaultValue)
><font color=black
>at(keyString, optionalDefaultValue)
</font></a></b><p>
3427 <div style=
"width:40em; margin-left:2em">
3428 Returns the value for the key keyString. Returns nil if the key is absent.
3433 <b><a name=Map-atIfAbsentPut(keyString, aValue)
><font color=black
>atIfAbsentPut(keyString, aValue)
</font></a></b><p>
3434 <div style=
"width:40em; margin-left:2em">
3435 If a value is present at the specified key, the value is returned.
3436 Otherwise, inserts/sets aValue and returns aValue.
3441 <b><a name=Map-atPut(keyString, aValue)
><font color=black
>atPut(keyString, aValue)
</font></a></b><p>
3442 <div style=
"width:40em; margin-left:2em">
3443 Inserts/sets aValue with the key keyString. Returns self.
3448 <b><a name=Map-empty
><font color=black
>empty
</font></a></b><p>
3449 <div style=
"width:40em; margin-left:2em">
3450 Removes all keys from the receiver. Returns self.
3455 <b><a name=Map-foreach(optionalKey, value, message)
><font color=black
>foreach(optionalKey, value, message)
</font></a></b><p>
3456 <div style=
"width:40em; margin-left:2em">
3457 For each key value pair, sets the locals key to
3458 the key and value to the value and executes message.
3460 <code> aMap foreach(k, v, writeln(k,
" = ", v))
3461 aMap foreach(v, write(v))
</code>
3463 Example use with a block:
3465 <code> myBlock = block(k, v, write(k,
" = ", v,
"\n"))
3466 aMap foreach(k, v, myBlock(k, v))
</code>
3471 <b><a name=Map-hasKey(keyString)
><font color=black
>hasKey(keyString)
</font></a></b><p>
3472 <div style=
"width:40em; margin-left:2em">
3473 Returns true if the key is present or false otherwise.
3478 <b><a name=Map-hasValue(aValue)
><font color=black
>hasValue(aValue)
</font></a></b><p>
3479 <div style=
"width:40em; margin-left:2em">
3480 Returns true if the value is one of the Map's values or false otherwise.
3485 <b><a name=Map-keys
><font color=black
>keys
</font></a></b><p>
3486 <div style=
"width:40em; margin-left:2em">
3487 Returns a List of the receivers keys.
3492 <b><a name=Map-removeAt(keyString)
><font color=black
>removeAt(keyString)
</font></a></b><p>
3493 <div style=
"width:40em; margin-left:2em">
3494 Removes the specified keyString if present. Returns self.
3499 <b><a name=Map-size
><font color=black
>size
</font></a></b><p>
3500 <div style=
"width:40em; margin-left:2em">
3501 Returns the number of key/value pairs in the receiver.
3506 <b><a name=Map-values
><font color=black
>values
</font></a></b><p>
3507 <div style=
"width:40em; margin-left:2em">
3508 Returns a List of the receivers values.
3517 <h2><a name=Message
><font color=black
>Message
</font></a></h2>
3518 <ul style=
"width:40em">
3519 <b><font color=#
000>Protos:
</font></b> Object
3520 <h3>Description
</h3>
3521 A Message object encapsulates the action of a message send.
3522 Blocks are composed of a Message and its children.
3528 In the above example:
3531 Important; Modifying the message tree of a block currently in use may cause
3532 a crash if a garbage collection cycle occurs. If the implementation were
3533 changed to retain every called message, this could be avoided.
3534 But the cost to performance seems to outweigh the need to cover this case for now.
3538 <div style=
"width:40em; margin-left:2em">
3539 <b><a href=#Message-appendArg(aMessage)
>appendArg(aMessage)
</a></b><br>
3540 <b><a href=#Message-appendCachedArg(aValue)
>appendCachedArg(aValue)
</a></b><br>
3541 <b><a href=#Message-argAt(indexNumber)
>argAt(indexNumber)
</a></b><br>
3542 <b><a href=#Message-argCount
>argCount
</a></b><br>
3543 <b><a href=#Message-argsEvaluatedIn(anObject)
>argsEvaluatedIn(anObject)
</a></b><br>
3544 <b><a href=#Message-arguments
>arguments
</a></b><br>
3545 <b><a href=#Message-asString
>asString
</a></b><br>
3546 <b><a href=#Message-cachedResult
>cachedResult
</a></b><br>
3547 <b><a href=#Message-characterNumber
>characterNumber
</a></b><br>
3548 <b><a href=#Message-clone
>clone
</a></b><br>
3549 <b><a href=#Message-code
>code
</a></b><br>
3550 <b><a href=#Message-doInContext(anObject, locals)
>doInContext(anObject, locals)
</a></b><br>
3551 <b><a href=#Message-evaluatedArgs
>evaluatedArgs
</a></b><br>
3552 <b><a href=#Message-fromString(aString)
>fromString(aString)
</a></b><br>
3553 <b><a href=#Message-hasCachedResult
>hasCachedResult
</a></b><br>
3554 <b><a href=#Message-isEndOfLine
>isEndOfLine
</a></b><br>
3555 <b><a href=#Message-label
>label
</a></b><br>
3556 <b><a href=#Message-last
>last
</a></b><br>
3557 <b><a href=#Message-lastBeforeEndOfLine
>lastBeforeEndOfLine
</a></b><br>
3558 <b><a href=#Message-lineNumber
>lineNumber
</a></b><br>
3559 <b><a href=#Message-name
>name
</a></b><br>
3560 <b><a href=#Message-next
>next
</a></b><br>
3561 <b><a href=#Message-nextIgnoreEndOfLines
>nextIgnoreEndOfLines
</a></b><br>
3562 <b><a href=#Message-previous
>previous
</a></b><br>
3563 <b><a href=#Message-removeCachedResult
>removeCachedResult
</a></b><br>
3564 <b><a href=#Message-setArguments(aListOfMessages)
>setArguments(aListOfMessages)
</a></b><br>
3565 <b><a href=#Message-setCachedResult(anObject)
>setCachedResult(anObject)
</a></b><br>
3566 <b><a href=#Message-setCharacterNumber(aNumber)
>setCharacterNumber(aNumber)
</a></b><br>
3567 <b><a href=#Message-setLabel(aString)
>setLabel(aString)
</a></b><br>
3568 <b><a href=#Message-setLineNumber(aNumber)
>setLineNumber(aNumber)
</a></b><br>
3569 <b><a href=#Message-setName(aString)
>setName(aString)
</a></b><br>
3570 <b><a href=#Message-setNextMessage(aMessageOrNil)
>setNextMessage(aMessageOrNil)
</a></b><br>
3571 <b><a href=#Message-setPrevious(aMessageOrNil)
>setPrevious(aMessageOrNil)
</a></b><br>
3572 <b><a href=#Message-union(other) Creates a union of the receiver and the other parameter.
>union(other) Creates a union of the receiver and the other parameter.
</a></b><br>
3577 <b><a name=Message-appendArg(aMessage)
><font color=black
>appendArg(aMessage)
</font></a></b><p>
3578 <div style=
"width:40em; margin-left:2em">
3579 Adds aMessage to the argument list of receiver. Examples,
3581 Io
> message(a) appendArg(message(b))
3584 Io
> message(a(
1,
2)) appendArg(message(
3))
3591 <b><a name=Message-appendCachedArg(aValue)
><font color=black
>appendCachedArg(aValue)
</font></a></b><p>
3592 <div style=
"width:40em; margin-left:2em">
3593 Adds aValue to the argument list of receiver as a cachedResult.
3598 <b><a name=Message-argAt(indexNumber)
><font color=black
>argAt(indexNumber)
</font></a></b><p>
3599 <div style=
"width:40em; margin-left:2em">
3600 Returns Message object for the specified argument or Nil if none exists.
3605 <b><a name=Message-argCount
><font color=black
>argCount
</font></a></b><p>
3606 <div style=
"width:40em; margin-left:2em">
3607 Returns the number of arguments this message has. A faster way to do, msg arguments size. Examples,
3609 Io
> message(a(
1,
2,
3)) argCount
3612 Io
> message(a) argCount
3619 <b><a name=Message-argsEvaluatedIn(anObject)
><font color=black
>argsEvaluatedIn(anObject)
</font></a></b><p>
3620 <div style=
"width:40em; margin-left:2em">
3621 Returns a List containing the argument messages evaluated in the
3622 context of anObject.
3627 <b><a name=Message-arguments
><font color=black
>arguments
</font></a></b><p>
3628 <div style=
"width:40em; margin-left:2em">
3629 Returns a list of the message objects that act as the
3630 receiver's arguments. Modifying this list will not alter the actual
3631 list of arguments. Use the arguments_() method to do that.
3636 <b><a name=Message-asString
><font color=black
>asString
</font></a></b><p>
3637 <div style=
"width:40em; margin-left:2em">
3643 <b><a name=Message-cachedResult
><font color=black
>cachedResult
</font></a></b><p>
3644 <div style=
"width:40em; margin-left:2em">
3645 Returns the cached result of the Message or Nil if there is none.
3650 <b><a name=Message-characterNumber
><font color=black
>characterNumber
</font></a></b><p>
3651 <div style=
"width:40em; margin-left:2em">
3652 Returns the message character number. The charcter number is typically
3653 the beggining character index in the source text from with the message was read.
3658 <b><a name=Message-clone
><font color=black
>clone
</font></a></b><p>
3659 <div style=
"width:40em; margin-left:2em">
3660 Returns a Message that is a deep copy of the receiver.
3665 <b><a name=Message-code
><font color=black
>code
</font></a></b><p>
3666 <div style=
"width:40em; margin-left:2em">
3667 Returns a String containing a decompiled code representation of the receiver.
3672 <b><a name=Message-doInContext(anObject, locals)
><font color=black
>doInContext(anObject, locals)
</font></a></b><p>
3673 <div style=
"width:40em; margin-left:2em">
3674 Evaluates the receiver in the context of anObject.
3679 <b><a name=Message-evaluatedArgs
><font color=black
>evaluatedArgs
</font></a></b><p>
3680 <div style=
"width:40em; margin-left:2em">
3681 Returns a List containing the argument messages evaluated in the context.
3686 <b><a name=Message-fromString(aString)
><font color=black
>fromString(aString)
</font></a></b><p>
3687 <div style=
"width:40em; margin-left:2em">
3688 Returns a new Message object for the compiled(but not executed)
3694 <b><a name=Message-hasCachedResult
><font color=black
>hasCachedResult
</font></a></b><p>
3695 <div style=
"width:40em; margin-left:2em">
3696 Returns true if there is a cached result. Nil is a valid cached result.
3701 <b><a name=Message-isEndOfLine
><font color=black
>isEndOfLine
</font></a></b><p>
3702 <div style=
"width:40em; margin-left:2em">
3703 Returns true if the message marks the end of the line. A ';' message.
3708 <b><a name=Message-label
><font color=black
>label
</font></a></b><p>
3709 <div style=
"width:40em; margin-left:2em">
3710 Returns the message label. The label is typically set the the
3711 name of the file from which the source code for the message was read.
3716 <b><a name=Message-last
><font color=black
>last
</font></a></b><p>
3717 <div style=
"width:40em; margin-left:2em">
3718 Returns the last message in the chain.
3723 <b><a name=Message-lastBeforeEndOfLine
><font color=black
>lastBeforeEndOfLine
</font></a></b><p>
3724 <div style=
"width:40em; margin-left:2em">
3725 Returns the last message in the chain before the EndOfLine or nil.
3730 <b><a name=Message-lineNumber
><font color=black
>lineNumber
</font></a></b><p>
3731 <div style=
"width:40em; margin-left:2em">
3732 Returns the line number of the message. The charcter number
3733 is typically the line number in the source text from with the message was read.
3738 <b><a name=Message-name
><font color=black
>name
</font></a></b><p>
3739 <div style=
"width:40em; margin-left:2em">
3740 Returns the name of the receiver.
3745 <b><a name=Message-next
><font color=black
>next
</font></a></b><p>
3746 <div style=
"width:40em; margin-left:2em">
3747 Returns the next message in the message chain or nil if there is no next message.
3752 <b><a name=Message-nextIgnoreEndOfLines
><font color=black
>nextIgnoreEndOfLines
</font></a></b><p>
3753 <div style=
"width:40em; margin-left:2em">
3754 Returns the next message in the message chain which is not an
3755 EndOfLine or nil if there is no next message.
3760 <b><a name=Message-previous
><font color=black
>previous
</font></a></b><p>
3761 <div style=
"width:40em; margin-left:2em">
3762 Returns the previous message in the message chain or Nil if there is no previous message.
3767 <b><a name=Message-removeCachedResult
><font color=black
>removeCachedResult
</font></a></b><p>
3768 <div style=
"width:40em; margin-left:2em">
3769 Removes the cached result of the Message.
3774 <b><a name=Message-setArguments(aListOfMessages)
><font color=black
>setArguments(aListOfMessages)
</font></a></b><p>
3775 <div style=
"width:40em; margin-left:2em">
3776 Sets the arguments of the receiver to deep copies of
3777 those contained in aListOfMessages. Returns self.
3782 <b><a name=Message-setCachedResult(anObject)
><font color=black
>setCachedResult(anObject)
</font></a></b><p>
3783 <div style=
"width:40em; margin-left:2em">
3784 Sets the cached result of the message. Returns self.
3789 <b><a name=Message-setCharacterNumber(aNumber)
><font color=black
>setCharacterNumber(aNumber)
</font></a></b><p>
3790 <div style=
"width:40em; margin-left:2em">
3791 Sets the character number of the message. Returns self.
3796 <b><a name=Message-setLabel(aString)
><font color=black
>setLabel(aString)
</font></a></b><p>
3797 <div style=
"width:40em; margin-left:2em">
3798 Sets the label of the message and its children. Returns self.
3803 <b><a name=Message-setLineNumber(aNumber)
><font color=black
>setLineNumber(aNumber)
</font></a></b><p>
3804 <div style=
"width:40em; margin-left:2em">
3805 Sets the line number of the message. Returns self.
3810 <b><a name=Message-setName(aString)
><font color=black
>setName(aString)
</font></a></b><p>
3811 <div style=
"width:40em; margin-left:2em">
3812 Sets the name of the receiver. Returns self.
3817 <b><a name=Message-setNextMessage(aMessageOrNil)
><font color=black
>setNextMessage(aMessageOrNil)
</font></a></b><p>
3818 <div style=
"width:40em; margin-left:2em">
3819 Sets the next message in the message chain to a deep copy of
3820 aMessage or it removes the next message if aMessage is nil.
3825 <b><a name=Message-setPrevious(aMessageOrNil)
><font color=black
>setPrevious(aMessageOrNil)
</font></a></b><p>
3826 <div style=
"width:40em; margin-left:2em">
3827 Sets the previous message in the message chain to a deep copy of
3828 aMessage or it removes the previous message if aMessage is Nil.
3833 <b><a name=Message-union(other) Creates a union of the receiver and the other parameter.
><font color=black
>union(other) Creates a union of the receiver and the other parameter.
</font></a></b><p>
3834 <div style=
"width:40em; margin-left:2em">
3835 Returns a new message object with the receivers message as the first argument of the returned message,
3836 and the other parameter's arguments as each successive argument to the new message.
3845 <h2><a name=MutableSequence
><font color=black
>MutableSequence
</font></a></h2>
3846 <ul style=
"width:40em">
3847 <b><font color=#
000>Protos:
</font></b> Object
3849 <div style=
"width:40em; margin-left:2em">
3850 <b><a href=#MutableSequence-Lowercase
>Lowercase
</a></b><br>
3851 <b><a href=#MutableSequence-append(aNumber)
>append(aNumber)
</a></b><br>
3852 <b><a href=#MutableSequence-appendPathSeq(aSeq)
>appendPathSeq(aSeq)
</a></b><br>
3853 <b><a href=#MutableSequence-appendSeq(object1, object2, ...)
>appendSeq(object1, object2, ...)
</a></b><br>
3854 <b><a href=#MutableSequence-atInsertSeq(indexNumber, object)
>atInsertSeq(indexNumber, object)
</a></b><br>
3855 <b><a href=#MutableSequence-atPut(aNumberIndex, aNumber)
>atPut(aNumberIndex, aNumber)
</a></b><br>
3856 <b><a href=#MutableSequence-capitalize
>capitalize
</a></b><br>
3857 <b><a href=#MutableSequence-clear
>clear
</a></b><br>
3858 <b><a href=#MutableSequence-clipAfterSeq(aSequence)
>clipAfterSeq(aSequence)
</a></b><br>
3859 <b><a href=#MutableSequence-clipAfterStartOfSeq(aSequence)
>clipAfterStartOfSeq(aSequence)
</a></b><br>
3860 <b><a href=#MutableSequence-clipBeforeEndOfSeq(aSequence)
>clipBeforeEndOfSeq(aSequence)
</a></b><br>
3861 <b><a href=#MutableSequence-clipBeforeSeq(aSequence)
>clipBeforeSeq(aSequence)
</a></b><br>
3862 <b><a href=#MutableSequence-copy(aSequence)
>copy(aSequence)
</a></b><br>
3863 <b><a href=#MutableSequence-duplicateIndexes
>duplicateIndexes
</a></b><br>
3864 <b><a href=#MutableSequence-escape
>escape
</a></b><br>
3865 <b><a href=#MutableSequence-interpolateInPlace(optionalContext)
>interpolateInPlace(optionalContext)
</a></b><br>
3866 <b><a href=#MutableSequence-lstrip(aSequence)
>lstrip(aSequence)
</a></b><br>
3867 <b><a href=#MutableSequence-preallocateToSize(aNumber)
>preallocateToSize(aNumber)
</a></b><br>
3868 <b><a href=#MutableSequence-removeAt(index)
>removeAt(index)
</a></b><br>
3869 <b><a href=#MutableSequence-removeEvenIndexes
>removeEvenIndexes
</a></b><br>
3870 <b><a href=#MutableSequence-removeLast
>removeLast
</a></b><br>
3871 <b><a href=#MutableSequence-removeOddIndexes
>removeOddIndexes
</a></b><br>
3872 <b><a href=#MutableSequence-removePrefix(aSequence)
>removePrefix(aSequence)
</a></b><br>
3873 <b><a href=#MutableSequence-removeSeq(aSequence)
>removeSeq(aSequence)
</a></b><br>
3874 <b><a href=#MutableSequence-removeSlice(startIndex, endIndex)
>removeSlice(startIndex, endIndex)
</a></b><br>
3875 <b><a href=#MutableSequence-removeSuffix(aSequence)
>removeSuffix(aSequence)
</a></b><br>
3876 <b><a href=#MutableSequence-replaceFirstSeq(aSequence, anotherSequence, optionalStartIndex)
>replaceFirstSeq(aSequence, anotherSequence, optionalStartIndex)
</a></b><br>
3877 <b><a href=#MutableSequence-replaceMap(aMap)
>replaceMap(aMap)
</a></b><br>
3878 <b><a href=#MutableSequence-replaceSeq(aSequence, anotherSequence)
>replaceSeq(aSequence, anotherSequence)
</a></b><br>
3879 <b><a href=#MutableSequence-reverse
>reverse
</a></b><br>
3880 <b><a href=#MutableSequence-rstrip(aSequence)
>rstrip(aSequence)
</a></b><br>
3881 <b><a href=#MutableSequence-setEncoding(encodingName)
>setEncoding(encodingName)
</a></b><br>
3882 <b><a href=#MutableSequence-setItemType(aTypeName)
>setItemType(aTypeName)
</a></b><br>
3883 <b><a href=#MutableSequence-setSize(aNumber)
>setSize(aNumber)
</a></b><br>
3884 <b><a href=#MutableSequence-strip(optionalSequence)
>strip(optionalSequence)
</a></b><br>
3885 <b><a href=#MutableSequence-translate(fromChars, toChars)
>translate(fromChars, toChars)
</a></b><br>
3886 <b><a href=#MutableSequence-unescape
>unescape
</a></b><br>
3887 <b><a href=#MutableSequence-uppercase
>uppercase
</a></b><br>
3892 <b><a name=MutableSequence-Lowercase
><font color=black
>Lowercase
</font></a></b><p>
3893 <div style=
"width:40em; margin-left:2em">
3894 Returns a copy of the receiver with all characters made Lowercase.
3899 <b><a name=MutableSequence-append(aNumber)
><font color=black
>append(aNumber)
</font></a></b><p>
3900 <div style=
"width:40em; margin-left:2em">
3901 Appends aNumber (cast to a byte) to the receiver. Returns self.
3906 <b><a name=MutableSequence-appendPathSeq(aSeq)
><font color=black
>appendPathSeq(aSeq)
</font></a></b><p>
3907 <div style=
"width:40em; margin-left:2em">
3908 Appends argument to the receiver such that there is one
3909 and only one path separator between the two. Returns self.
3914 <b><a name=MutableSequence-appendSeq(object1, object2, ...)
><font color=black
>appendSeq(object1, object2, ...)
</font></a></b><p>
3915 <div style=
"width:40em; margin-left:2em">
3916 Calls asString on the arguments and appends the string to the receiver. Returns self.
3921 <b><a name=MutableSequence-atInsertSeq(indexNumber, object)
><font color=black
>atInsertSeq(indexNumber, object)
</font></a></b><p>
3922 <div style=
"width:40em; margin-left:2em">
3923 Calls asString on object and inserts the string at position indexNumber. Returns self.
3928 <b><a name=MutableSequence-atPut(aNumberIndex, aNumber)
><font color=black
>atPut(aNumberIndex, aNumber)
</font></a></b><p>
3929 <div style=
"width:40em; margin-left:2em">
3930 Sets the value at the index specified by aNumberIndex to aNumber. Returns self.
3935 <b><a name=MutableSequence-capitalize
><font color=black
>capitalize
</font></a></b><p>
3936 <div style=
"width:40em; margin-left:2em">
3937 First charater of the receiver is made uppercase.
3942 <b><a name=MutableSequence-clear
><font color=black
>clear
</font></a></b><p>
3943 <div style=
"width:40em; margin-left:2em">
3944 Sets all bytes in the receiver to
0x0 and sets
3945 it's length to
0. Returns self.
3950 <b><a name=MutableSequence-clipAfterSeq(aSequence)
><font color=black
>clipAfterSeq(aSequence)
</font></a></b><p>
3951 <div style=
"width:40em; margin-left:2em">
3952 Removes the contents of the receiver after the end of
3953 the first occurance of aSequence. Returns true if anything was
3954 removed, or false otherwise.
3959 <b><a name=MutableSequence-clipAfterStartOfSeq(aSequence)
><font color=black
>clipAfterStartOfSeq(aSequence)
</font></a></b><p>
3960 <div style=
"width:40em; margin-left:2em">
3961 Removes the contents of the receiver after the beginning of
3962 the first occurance of aSequence. Returns true if anything was
3963 removed, or false otherwise.
3968 <b><a name=MutableSequence-clipBeforeEndOfSeq(aSequence)
><font color=black
>clipBeforeEndOfSeq(aSequence)
</font></a></b><p>
3969 <div style=
"width:40em; margin-left:2em">
3970 Removes the contents of the receiver before the end of
3971 the first occurance of aSequence. Returns true if anything was
3972 removed, or false otherwise.
3977 <b><a name=MutableSequence-clipBeforeSeq(aSequence)
><font color=black
>clipBeforeSeq(aSequence)
</font></a></b><p>
3978 <div style=
"width:40em; margin-left:2em">
3979 Clips receiver before aSequence.
3984 <b><a name=MutableSequence-copy(aSequence)
><font color=black
>copy(aSequence)
</font></a></b><p>
3985 <div style=
"width:40em; margin-left:2em">
3986 Replaces the bytes of the receiver with a copy of those in aSequence. Returns self.
3991 <b><a name=MutableSequence-duplicateIndexes
><font color=black
>duplicateIndexes
</font></a></b><p>
3992 <div style=
"width:40em; margin-left:2em">
3993 Duplicates all indexes in the receiver.
3994 For example, list(
1,
2,
3) duplicateIndexes == list(
1,
1,
2,
2,
3,
3). Returns self.
")
3999 <b><a name=MutableSequence-escape><font color=black>escape</font></a></b><p>
4000 <div style="width:
40em; margin-left:
2em
">
4001 Escape characters in the receiver are replaced with escape codes.
4002 For example a string containing a single return character would contain the
4003 following 2 characters after being escaped: "\n
". Returns self.
4008 <b><a name=MutableSequence-interpolateInPlace(optionalContext)><font color=black>interpolateInPlace(optionalContext)</font></a></b><p>
4009 <div style="width:
40em; margin-left:
2em
">
4010 Replaces all #{expression} with expression evaluated in the optionalContext.
4011 If optionalContext not given, the current context is used. Returns self.
4016 <b><a name=MutableSequence-lstrip(aSequence)><font color=black>lstrip(aSequence)</font></a></b><p>
4017 <div style="width:
40em; margin-left:
2em
">
4018 Strips the characters in aSequence
4019 stripped from the beginning of the receiver. Example:
4021 "Keep the tail
" lstrip(" eKp
")
4028 <b><a name=MutableSequence-preallocateToSize(aNumber)><font color=black>preallocateToSize(aNumber)</font></a></b><p>
4029 <div style="width:
40em; margin-left:
2em
">
4030 If needed, resize the memory alloced for the receivers
4031 byte array to be large enough to fit the number of bytes specified by
4032 aNumber. This is useful for pio_reallocating the memory so it doesn't
4033 keep getting allocated as the Sequence is appended to. This operation
4034 will not change the Sequence's length or contents. Returns self.
4039 <b><a name=MutableSequence-removeAt(index)><font color=black>removeAt(index)</font></a></b><p>
4040 <div style="width:
40em; margin-left:
2em
">
4041 Removes the item at index. Returns self.
4046 <b><a name=MutableSequence-removeEvenIndexes><font color=black>removeEvenIndexes</font></a></b><p>
4047 <div style="width:
40em; margin-left:
2em
">
4048 Removes even indexes in the receiver.
4049 For example, list(1,2,3) removeEvenIndexes == list(1, 3). Returns self.
4054 <b><a name=MutableSequence-removeLast><font color=black>removeLast</font></a></b><p>
4055 <div style="width:
40em; margin-left:
2em
">
4056 Removes the last element from the receiver. Returns self.
4061 <b><a name=MutableSequence-removeOddIndexes><font color=black>removeOddIndexes</font></a></b><p>
4062 <div style="width:
40em; margin-left:
2em
">
4063 Removes odd indexes in the receiver.
4064 For example, list(1,2,3) removeOddIndexes == list(2). Returns self.
4069 <b><a name=MutableSequence-removePrefix(aSequence)><font color=black>removePrefix(aSequence)</font></a></b><p>
4070 <div style="width:
40em; margin-left:
2em
">
4071 If the receiver begins with aSequence, it is removed. Returns self.
4076 <b><a name=MutableSequence-removeSeq(aSequence)><font color=black>removeSeq(aSequence)</font></a></b><p>
4077 <div style="width:
40em; margin-left:
2em
">
4078 Removes occurances of aSequence from the receiver.
4083 <b><a name=MutableSequence-removeSlice(startIndex, endIndex)><font color=black>removeSlice(startIndex, endIndex)</font></a></b><p>
4084 <div style="width:
40em; margin-left:
2em
">
4085 Removes the items from startIndex to endIndex.
4091 <b><a name=MutableSequence-removeSuffix(aSequence)><font color=black>removeSuffix(aSequence)</font></a></b><p>
4092 <div style="width:
40em; margin-left:
2em
">
4093 If the receiver end with aSequence, it is removed. Returns self.
4098 <b><a name=MutableSequence-replaceFirstSeq(aSequence, anotherSequence, optionalStartIndex)><font color=black>replaceFirstSeq(aSequence, anotherSequence, optionalStartIndex)</font></a></b><p>
4099 <div style="width:
40em; margin-left:
2em
">
4100 Returns a new Sequence with the first occurance of aSequence
4101 replaced with anotherSequence in the receiver. If optionalStartIndex is
4102 provided, the search for aSequence begins at that index. Returns self.
4107 <b><a name=MutableSequence-replaceMap(aMap)><font color=black>replaceMap(aMap)</font></a></b><p>
4108 <div style="width:
40em; margin-left:
2em
">
4109 In the receiver, the keys of aMap replaced with it's values. Returns self.
4114 <b><a name=MutableSequence-replaceSeq(aSequence, anotherSequence)><font color=black>replaceSeq(aSequence, anotherSequence)</font></a></b><p>
4115 <div style="width:
40em; margin-left:
2em
">
4116 Returns a new Sequence with all occurances of aSequence
4117 replaced with anotherSequence in the receiver. Returns self.
4122 <b><a name=MutableSequence-reverse><font color=black>reverse</font></a></b><p>
4123 <div style="width:
40em; margin-left:
2em
">
4124 Reverses the bytes in the receiver, in-place.
4129 <b><a name=MutableSequence-rstrip(aSequence)><font color=black>rstrip(aSequence)</font></a></b><p>
4130 <div style="width:
40em; margin-left:
2em
">
4131 Strips the characters in
4132 aSequence stripped from the end of the receiver. Example:
4134 "Cut the tail off
" rstrip(" afilot
")
4141 <b><a name=MutableSequence-setEncoding(encodingName)><font color=black>setEncoding(encodingName)</font></a></b><p>
4142 <div style="width:
40em; margin-left:
2em
">
4143 Sets the encoding flag of the receiver (only the encoding flag,
4144 itemSize and itemType will change, no conversion is done between UTF
4145 encodings - you can use convertToUTF8, etc methods for conversions).
4146 Valid encodings are number, utf8, utf16, and utf32. Returns self.
4151 <b><a name=MutableSequence-setItemType(aTypeName)><font color=black>setItemType(aTypeName)</font></a></b><p>
4152 <div style="width:
40em; margin-left:
2em
">
4153 Sets the underlying machine type for the elements.
4154 Valid names are uint8, uint16, uint32, uint64, int8, int16, int32,
4155 int64, float32, and float64. Note that 64 bit types are only available
4156 on platforms that support such types. Returns self.
4161 <b><a name=MutableSequence-setSize(aNumber)><font color=black>setSize(aNumber)</font></a></b><p>
4162 <div style="width:
40em; margin-left:
2em
">
4163 Sets the length in bytes of the receiver to aNumber. Return self.
4168 <b><a name=MutableSequence-strip(optionalSequence)><font color=black>strip(optionalSequence)</font></a></b><p>
4169 <div style="width:
40em; margin-left:
2em
">
4170 Trims the whitespace (or optionalSequence) off both ends:
4173 " Trim this string \r\n
" strip
4174 ==> "Trim this string
"
4180 <b><a name=MutableSequence-translate(fromChars, toChars)><font color=black>translate(fromChars, toChars)</font></a></b><p>
4181 <div style="width:
40em; margin-left:
2em
">
4182 In the receiver, the characters in fromChars are replaced with those in the same positions in toChars. Returns self.
4187 <b><a name=MutableSequence-unescape><font color=black>unescape</font></a></b><p>
4188 <div style="width:
40em; margin-left:
2em
">
4189 Escape codes replaced with escape characters. Returns self.
4194 <b><a name=MutableSequence-uppercase><font color=black>uppercase</font></a></b><p>
4195 <div style="width:
40em; margin-left:
2em
">
4196 Makes all characters of the receiver uppercase.
4205 <h2><a name=Number><font color=black>Number</font></a></h2>
4206 <ul style="width:
40em
">
4207 <b><font color=#000>Protos:</font></b> Object
4208 <h3>Description</h3>
4209 A container for a double (a 64bit floating point number on most platforms).
4213 <div style="width:
40em; margin-left:
2em
">
4214 <b><a href=#Number-%(aNumber) >%(aNumber)</a></b><br>
4215 <b><a href=#Number-&(aNumber) >&(aNumber)</a></b><br>
4216 <b><a href=#Number-*(aNumber) >*(aNumber)</a></b><br>
4217 <b><a href=#Number-**(aNumber) >**(aNumber)</a></b><br>
4218 <b><a href=#Number-+(aNumber) >+(aNumber)</a></b><br>
4219 <b><a href=#Number--(aNumber) >-(aNumber)</a></b><br>
4220 <b><a href=#Number-/(aNumber) >/(aNumber)</a></b><br>
4221 <b><a href=#Number-^(aNumber) >^(aNumber)</a></b><br>
4222 <b><a href=#Number-abs >abs</a></b><br>
4223 <b><a href=#Number-acos >acos</a></b><br>
4224 <b><a href=#Number-asBinary >asBinary </a></b><br>
4225 <b><a href=#Number-asBuffer(optionalNumberOfBytes) >asBuffer(optionalNumberOfBytes)</a></b><br>
4226 <b><a href=#Number-asCharacter >asCharacter</a></b><br>
4227 <b><a href=#Number-asHex >asHex </a></b><br>
4228 <b><a href=#Number-asLowercase >asLowercase</a></b><br>
4229 <b><a href=#Number-asNumber >asNumber</a></b><br>
4230 <b><a href=#Number-asOctal >asOctal </a></b><br>
4231 <b><a href=#Number-asString(optionalIntegerDigits, optionalFactionDigits) >asString(optionalIntegerDigits, optionalFactionDigits)</a></b><br>
4232 <b><a href=#Number-asUint32Buffer >asUint32Buffer</a></b><br>
4233 <b><a href=#Number-asUppercase >asUppercase</a></b><br>
4234 <b><a href=#Number-asin >asin</a></b><br>
4235 <b><a href=#Number-at(bitIndexNumber) >at(bitIndexNumber)</a></b><br>
4236 <b><a href=#Number-atan >atan</a></b><br>
4237 <b><a href=#Number-atan2(aNumber) >atan2(aNumber)</a></b><br>
4238 <b><a href=#Number-between(aNumber1, aNumber2) >between(aNumber1, aNumber2)</a></b><br>
4239 <b><a href=#Number-bitwiseAnd(aNumber) >bitwiseAnd(aNumber)</a></b><br>
4240 <b><a href=#Number-bitwiseComplement >bitwiseComplement</a></b><br>
4241 <b><a href=#Number-bitwiseOr(aNumber) >bitwiseOr(aNumber)</a></b><br>
4242 <b><a href=#Number-bitwiseXor(aNumber) >bitwiseXor(aNumber)</a></b><br>
4243 <b><a href=#Number-ceil >ceil</a></b><br>
4244 <b><a href=#Number-clip(aNumber1, aNumber2) >clip(aNumber1, aNumber2)</a></b><br>
4245 <b><a href=#Number-combinations(size) >combinations(size)</a></b><br>
4246 <b><a href=#Number-constants >constants </a></b><br>
4247 <b><a href=#Number-cos >cos</a></b><br>
4248 <b><a href=#Number-cubed >cubed</a></b><br>
4249 <b><a href=#Number-days >days </a></b><br>
4250 <b><a href=#Number-doubleMin >doubleMin</a></b><br>
4251 <b><a href=#Number-e >e </a></b><br>
4252 <b><a href=#Number-exp >exp</a></b><br>
4253 <b><a href=#Number-factorial >factorial</a></b><br>
4254 <b><a href=#Number-floatMax >floatMax</a></b><br>
4255 <b><a href=#Number-floatMin >floatMin</a></b><br>
4256 <b><a href=#Number-floor >floor</a></b><br>
4257 <b><a href=#Number-hours >hours </a></b><br>
4258 <b><a href=#Number-inf >inf </a></b><br>
4259 <b><a href=#Number-integerMax >integerMax</a></b><br>
4260 <b><a href=#Number-integerMin >integerMin</a></b><br>
4261 <b><a href=#Number-isAlphaNumeric >isAlphaNumeric</a></b><br>
4262 <b><a href=#Number-isControlCharacter >isControlCharacter</a></b><br>
4263 <b><a href=#Number-isDigit >isDigit</a></b><br>
4264 <b><a href=#Number-isEven >isEven</a></b><br>
4265 <b><a href=#Number-isGraph >isGraph</a></b><br>
4266 <b><a href=#Number-isHexDigit >isHexDigit</a></b><br>
4267 <b><a href=#Number-isInASequenceSet >isInASequenceSet </a></b><br>
4268 <b><a href=#Number-isLetter >isLetter</a></b><br>
4269 <b><a href=#Number-isLowercase >isLowercase</a></b><br>
4270 <b><a href=#Number-isNan >isNan</a></b><br>
4271 <b><a href=#Number-isOdd >isOdd</a></b><br>
4272 <b><a href=#Number-isPrint >isPrint</a></b><br>
4273 <b><a href=#Number-isPunctuation >isPunctuation</a></b><br>
4274 <b><a href=#Number-isSpace >isSpace</a></b><br>
4275 <b><a href=#Number-isUppercase >isUppercase</a></b><br>
4276 <b><a href=#Number-log >log</a></b><br>
4277 <b><a href=#Number-log10 >log10</a></b><br>
4278 <b><a href=#Number-log2 >log2</a></b><br>
4279 <b><a href=#Number-longMax >longMax</a></b><br>
4280 <b><a href=#Number-longMin >longMin</a></b><br>
4281 <b><a href=#Number-max(aNumber) >max(aNumber)</a></b><br>
4282 <b><a href=#Number-min(aNumber) >min(aNumber)</a></b><br>
4283 <b><a href=#Number-minMax(low, high) >minMax(low, high)</a></b><br>
4284 <b><a href=#Number-minutes >minutes </a></b><br>
4285 <b><a href=#Number-mod(aNumber) >mod(aNumber)</a></b><br>
4286 <b><a href=#Number-nan >nan </a></b><br>
4287 <b><a href=#Number-negate >negate</a></b><br>
4288 <b><a href=#Number-permutations(size) >permutations(size)</a></b><br>
4289 <b><a href=#Number-pi >pi </a></b><br>
4290 <b><a href=#Number-pow(aNumber) >pow(aNumber)</a></b><br>
4291 <b><a href=#Number-print >print</a></b><br>
4292 <b><a href=#Number-repeat(optionalIndex, expression) >repeat(optionalIndex, expression)</a></b><br>
4293 <b><a href=#Number-round >round</a></b><br>
4294 <b><a href=#Number-roundDown >roundDown</a></b><br>
4295 <b><a href=#Number-seconds >seconds </a></b><br>
4296 <b><a href=#Number-shiftLeft(aNumber) >shiftLeft(aNumber)</a></b><br>
4297 <b><a href=#Number-shiftRight(aNumber) >shiftRight(aNumber)</a></b><br>
4298 <b><a href=#Number-shortMax >shortMax</a></b><br>
4299 <b><a href=#Number-shortMin >shortMin</a></b><br>
4300 <b><a href=#Number-sin >sin</a></b><br>
4301 <b><a href=#Number-sqrt >sqrt</a></b><br>
4302 <b><a href=#Number-squared >squared</a></b><br>
4303 <b><a href=#Number-tan >tan</a></b><br>
4304 <b><a href=#Number-toggle >toggle</a></b><br>
4305 <b><a href=#Number-unsignedIntMax >unsignedIntMax</a></b><br>
4306 <b><a href=#Number-unsignedLongMax >unsignedLongMax</a></b><br>
4307 <b><a href=#Number-unsignedShortMax >unsignedShortMax</a></b><br>
4308 <b><a href=#Number-years Returns Duration of receiver's years. >years Returns Duration of receiver's years.</a></b><br>
4309 <b><a href=#Number-|(aNumber) >|(aNumber)</a></b><br>
4314 <b><a name=Number-%(aNumber)><font color=black>%(aNumber)</font></a></b><p>
4315 <div style="width:
40em; margin-left:
2em
">
4316 Returns the receiver modulus aNumber.
4321 <b><a name=Number-&(aNumber)><font color=black>&(aNumber)</font></a></b><p>
4322 <div style="width:
40em; margin-left:
2em
">
4323 Returns a new number with the bitwise AND of the receiver and aNumber.
4328 <b><a name=Number-*(aNumber)><font color=black>*(aNumber)</font></a></b><p>
4329 <div style="width:
40em; margin-left:
2em
">
4330 Returns a new number that is the product of the receiver and aNumber.
4335 <b><a name=Number-**(aNumber)><font color=black>**(aNumber)</font></a></b><p>
4336 <div style="width:
40em; margin-left:
2em
">
4337 Same as pow(aNumber).
4342 <b><a name=Number-+(aNumber)><font color=black>+(aNumber)</font></a></b><p>
4343 <div style="width:
40em; margin-left:
2em
">
4344 Returns a new number that is the sum of the receiver and aNumber.
4349 <b><a name=Number--(aNumber)><font color=black>-(aNumber)</font></a></b><p>
4350 <div style="width:
40em; margin-left:
2em
">
4351 Returns a new number that is the difference of the receiver and aNumber.
4356 <b><a name=Number-/(aNumber)><font color=black>/(aNumber)</font></a></b><p>
4357 <div style="width:
40em; margin-left:
2em
">
4358 Returns a new number with the value of the receiver diveded by aNumber.
4363 <b><a name=Number-^(aNumber)><font color=black>^(aNumber)</font></a></b><p>
4364 <div style="width:
40em; margin-left:
2em
">
4365 Returns the bitwise xor with the receiver (both numbers are converted to longs for the operation).
4370 <b><a name=Number-abs><font color=black>abs</font></a></b><p>
4371 <div style="width:
40em; margin-left:
2em
">
4372 Returns a number with the absolute value of the receiver.
4377 <b><a name=Number-acos><font color=black>acos</font></a></b><p>
4378 <div style="width:
40em; margin-left:
2em
">
4379 Returns a number with the arc cosine of the receiver.
4384 <b><a name=Number-asBinary ><font color=black>asBinary </font></a></b><p>
4385 <div style="width:
40em; margin-left:
2em
">
4386 Returns the number as binary digits inside a string. 42 asBinary -> "101010"
4391 <b><a name=Number-asBuffer(optionalNumberOfBytes)><font color=black>asBuffer(optionalNumberOfBytes)</font></a></b><p>
4392 <div style="width:
40em; margin-left:
2em
">
4393 Returns a Buffer containing a the number of bytes specified by
4394 optionalNumberOfBytes (up to the size of a double on the platform) of the reciever.
4395 If no optionalNumberOfBytes is specified, it is assumed to be the number of bytes
4396 in a double on the host platform.
4401 <b><a name=Number-asCharacter><font color=black>asCharacter</font></a></b><p>
4402 <div style="width:
40em; margin-left:
2em
">
4403 Returns a String containing a single character whose
4404 value is the ascii value of the first byte of the receiver.
4409 <b><a name=Number-asHex ><font color=black>asHex </font></a></b><p>
4410 <div style="width:
40em; margin-left:
2em
">
4411 Returns the number as hex digits inside a string. 97 asHex -> "61"
4416 <b><a name=Number-asLowercase><font color=black>asLowercase</font></a></b><p>
4417 <div style="width:
40em; margin-left:
2em
">
4418 Returns a new Number containing a lower case version of the receiver.
4423 <b><a name=Number-asNumber><font color=black>asNumber</font></a></b><p>
4424 <div style="width:
40em; margin-left:
2em
">
4430 <b><a name=Number-asOctal ><font color=black>asOctal </font></a></b><p>
4431 <div style="width:
40em; margin-left:
2em
">
4432 Returns the number as octal digits inside a string. 436 asOctal -> "664"
4437 <b><a name=Number-asString(optionalIntegerDigits, optionalFactionDigits)><font color=black>asString(optionalIntegerDigits, optionalFactionDigits)</font></a></b><p>
4438 <div style="width:
40em; margin-left:
2em
">
4439 Returns a string representation of the receiver. For example:
4440 <code> 1234.5678 asString(0, 2)</code>
4442 <code> $1234.56</code>
4447 <b><a name=Number-asUint32Buffer><font color=black>asUint32Buffer</font></a></b><p>
4448 <div style="width:
40em; margin-left:
2em
">
4449 Returns a Sequence containing a 4 byte representation of the uint32 value of the receiver.
4454 <b><a name=Number-asUppercase><font color=black>asUppercase</font></a></b><p>
4455 <div style="width:
40em; margin-left:
2em
">
4456 Returns a new Number containing a upper case version of the receiver.
4461 <b><a name=Number-asin><font color=black>asin</font></a></b><p>
4462 <div style="width:
40em; margin-left:
2em
">
4463 Returns a number with the arc sine of the receiver.
4468 <b><a name=Number-at(bitIndexNumber)><font color=black>at(bitIndexNumber)</font></a></b><p>
4469 <div style="width:
40em; margin-left:
2em
">
4470 Returns a new Number containing 1 if the receiver cast to a long
4471 has it's bit set to 1 at bitIndexNumber. Otherwise returns 0.
4476 <b><a name=Number-atan><font color=black>atan</font></a></b><p>
4477 <div style="width:
40em; margin-left:
2em
">
4478 Returns a number with the arc tangent of the receiver.
4483 <b><a name=Number-atan2(aNumber)><font color=black>atan2(aNumber)</font></a></b><p>
4484 <div style="width:
40em; margin-left:
2em
">
4485 Returns a number with the arc tangent of y/x where y is the receiver and x is aNumber.
4490 <b><a name=Number-between(aNumber1, aNumber2)><font color=black>between(aNumber1, aNumber2)</font></a></b><p>
4491 <div style="width:
40em; margin-left:
2em
">
4492 Returns the true if the receiver's value is between or
4493 equal to aNumber1 and aNumber2, otherwise returns false.
4498 <b><a name=Number-bitwiseAnd(aNumber)><font color=black>bitwiseAnd(aNumber)</font></a></b><p>
4499 <div style="width:
40em; margin-left:
2em
">
4500 Returns a new number with the bitwise AND of the receiver and aNumber.
4505 <b><a name=Number-bitwiseComplement><font color=black>bitwiseComplement</font></a></b><p>
4506 <div style="width:
40em; margin-left:
2em
">
4507 Returns a new number with the bitwise complement of the
4508 receiver. (Turns the 0 bits of become 1s and the 1 bits become 0s. )
4513 <b><a name=Number-bitwiseOr(aNumber)><font color=black>bitwiseOr(aNumber)</font></a></b><p>
4514 <div style="width:
40em; margin-left:
2em
">
4515 Returns a new number with the bitwise AND of the receiver and aNumber.
4520 <b><a name=Number-bitwiseXor(aNumber)><font color=black>bitwiseXor(aNumber)</font></a></b><p>
4521 <div style="width:
40em; margin-left:
2em
">
4522 Returns a new number with the bitwise XOR of the receiver and aNumber.
4527 <b><a name=Number-ceil><font color=black>ceil</font></a></b><p>
4528 <div style="width:
40em; margin-left:
2em
">
4529 Returns the a number with the receiver's value rounded up to
4530 the nearest integer if it's fractional component is greater than 0.
4535 <b><a name=Number-clip(aNumber1, aNumber2)><font color=black>clip(aNumber1, aNumber2)</font></a></b><p>
4536 <div style="width:
40em; margin-left:
2em
">
4537 Returns self if the receiver is between aNumber1 and aNumber2.
4538 Returns aNumber1 if it is less than aNumber1. Returns aNumber2 if it is greater than aNumber2.
4543 <b><a name=Number-combinations(size)><font color=black>combinations(size)</font></a></b><p>
4544 <div style="width:
40em; margin-left:
2em
">
4545 Returns the combinations where the receiver is the number of different objects and size is the number to be arranged.
4550 <b><a name=Number-constants ><font color=black>constants </font></a></b><p>
4551 <div style="width:
40em; margin-left:
2em
">
4552 Object containing number constants e, inf, nan and pi.
4557 <b><a name=Number-cos><font color=black>cos</font></a></b><p>
4558 <div style="width:
40em; margin-left:
2em
">
4559 Returns the cosine of the receiver.
4564 <b><a name=Number-cubed><font color=black>cubed</font></a></b><p>
4565 <div style="width:
40em; margin-left:
2em
">
4566 Returns the cube of the receiver.
4571 <b><a name=Number-days ><font color=black>days </font></a></b><p>
4572 <div style="width:
40em; margin-left:
2em
">
4573 Returns Duration of receiver's days. See `years' for a few examples.
4578 <b><a name=Number-doubleMin><font color=black>doubleMin</font></a></b><p>
4579 <div style="width:
40em; margin-left:
2em
">
4580 Returns the minimum double precision float value.
4585 <b><a name=Number-e ><font color=black>e </font></a></b><p>
4586 <div style="width:
40em; margin-left:
2em
">
4587 Returns the constant e.
4592 <b><a name=Number-exp><font color=black>exp</font></a></b><p>
4593 <div style="width:
40em; margin-left:
2em
">
4594 Returns e to the power of the receiver.
4599 <b><a name=Number-factorial><font color=black>factorial</font></a></b><p>
4600 <div style="width:
40em; margin-left:
2em
">
4601 Returns the factorial of the receiver.
4606 <b><a name=Number-floatMax><font color=black>floatMax</font></a></b><p>
4607 <div style="width:
40em; margin-left:
2em
">
4608 Returns the maximum double precision float value.
4613 <b><a name=Number-floatMin><font color=black>floatMin</font></a></b><p>
4614 <div style="width:
40em; margin-left:
2em
">
4615 Returns the minimum float value.
4620 <b><a name=Number-floor><font color=black>floor</font></a></b><p>
4621 <div style="width:
40em; margin-left:
2em
">
4622 Returns the a number with the receiver's value rounded
4623 down to the nearest integer if it's fractional component is not 0.
4628 <b><a name=Number-hours ><font color=black>hours </font></a></b><p>
4629 <div style="width:
40em; margin-left:
2em
">
4630 Returns Duration of receiver's hours. See `years' for a few examples.
4635 <b><a name=Number-inf ><font color=black>inf </font></a></b><p>
4636 <div style="width:
40em; margin-left:
2em
">
4637 Returns a not-a-number constant.
4642 <b><a name=Number-integerMax><font color=black>integerMax</font></a></b><p>
4643 <div style="width:
40em; margin-left:
2em
">
4644 Returns the maximum integer value.
4649 <b><a name=Number-integerMin><font color=black>integerMin</font></a></b><p>
4650 <div style="width:
40em; margin-left:
2em
">
4651 Returns the minimum integer value.
4656 <b><a name=Number-isAlphaNumeric><font color=black>isAlphaNumeric</font></a></b><p>
4657 <div style="width:
40em; margin-left:
2em
">
4658 Returns self if the receiver is an alphanumeric
4659 character value. Otherwise returns Nil.
4664 <b><a name=Number-isControlCharacter><font color=black>isControlCharacter</font></a></b><p>
4665 <div style="width:
40em; margin-left:
2em
">
4666 Returns self if the receiver is an control
4667 character value. Otherwise returns Nil.
4672 <b><a name=Number-isDigit><font color=black>isDigit</font></a></b><p>
4673 <div style="width:
40em; margin-left:
2em
">
4674 Returns self if the receiver is an numeric
4675 digit character value. Otherwise returns Nil.
4680 <b><a name=Number-isEven><font color=black>isEven</font></a></b><p>
4681 <div style="width:
40em; margin-left:
2em
">
4682 Returns self if integer form of the receiver is even. Otherwise returns Nil.
4687 <b><a name=Number-isGraph><font color=black>isGraph</font></a></b><p>
4688 <div style="width:
40em; margin-left:
2em
">
4689 Returns self if the receiver is a printing character
4690 value except space. Otherwise returns Nil.
4695 <b><a name=Number-isHexDigit><font color=black>isHexDigit</font></a></b><p>
4696 <div style="width:
40em; margin-left:
2em
">
4697 Returns self if the receiver is hexidecimal digit
4698 character value. Otherwise returns Nil.
4703 <b><a name=Number-isInASequenceSet ><font color=black>isInASequenceSet </font></a></b><p>
4704 <div style="width:
40em; margin-left:
2em
">
4705 Return true if receiver is in one of the Sequence sequenceSets, otherwise false.
4710 <b><a name=Number-isLetter><font color=black>isLetter</font></a></b><p>
4711 <div style="width:
40em; margin-left:
2em
">
4712 Returns self if the receiver is an alphanetic character value. Otherwise returns Nil.
4717 <b><a name=Number-isLowercase><font color=black>isLowercase</font></a></b><p>
4718 <div style="width:
40em; margin-left:
2em
">
4719 Returns self if the receiver is an lower case
4720 character value. Otherwise returns Nil.
4725 <b><a name=Number-isNan><font color=black>isNan</font></a></b><p>
4726 <div style="width:
40em; margin-left:
2em
">
4727 Returns true if the receiver is not a number. Otherwise returns false.
4732 <b><a name=Number-isOdd><font color=black>isOdd</font></a></b><p>
4733 <div style="width:
40em; margin-left:
2em
">
4734 Returns self if integer form of the receiver is even. Otherwise returns Nil.
4739 <b><a name=Number-isPrint><font color=black>isPrint</font></a></b><p>
4740 <div style="width:
40em; margin-left:
2em
">
4741 Returns self if the receiver is an printing character
4742 value, including space. Otherwise returns Nil.
4747 <b><a name=Number-isPunctuation><font color=black>isPunctuation</font></a></b><p>
4748 <div style="width:
40em; margin-left:
2em
">
4749 Returns self if the receiver is an printing character
4750 value, except space letter or digit. Otherwise returns Nil.
4755 <b><a name=Number-isSpace><font color=black>isSpace</font></a></b><p>
4756 <div style="width:
40em; margin-left:
2em
">
4757 Returns self if the receiver is a space, formfeed,
4758 newline carriage return, tab or vertical tab character value. Otherwise returns Nil.
4763 <b><a name=Number-isUppercase><font color=black>isUppercase</font></a></b><p>
4764 <div style="width:
40em; margin-left:
2em
">
4765 Returns self if the receiver is an upper case
4766 character value. Otherwise returns Nil.
4771 <b><a name=Number-log><font color=black>log</font></a></b><p>
4772 <div style="width:
40em; margin-left:
2em
">
4773 Returns the logarithm of the receiver. The base
4774 is taken as the value of the first argument or the constant e if
4775 the first argument is omitted.
4780 <b><a name=Number-log10><font color=black>log10</font></a></b><p>
4781 <div style="width:
40em; margin-left:
2em
">
4782 Returns the base 10 logarithm of the receiver.
4787 <b><a name=Number-log2><font color=black>log2</font></a></b><p>
4788 <div style="width:
40em; margin-left:
2em
">
4789 Returns the base 2 logarithm of the receiver.
4794 <b><a name=Number-longMax><font color=black>longMax</font></a></b><p>
4795 <div style="width:
40em; margin-left:
2em
">
4796 Returns the maximum long value.
4801 <b><a name=Number-longMin><font color=black>longMin</font></a></b><p>
4802 <div style="width:
40em; margin-left:
2em
">
4803 Returns the minimum long value.
4808 <b><a name=Number-max(aNumber)><font color=black>max(aNumber)</font></a></b><p>
4809 <div style="width:
40em; margin-left:
2em
">
4810 Returns the greater of the receiver and aNumber.
4815 <b><a name=Number-min(aNumber)><font color=black>min(aNumber)</font></a></b><p>
4816 <div style="width:
40em; margin-left:
2em
">
4817 Returns the lesser of the receiver and aNumber.
4822 <b><a name=Number-minMax(low, high)><font color=black>minMax(low, high)</font></a></b><p>
4823 <div style="width:
40em; margin-left:
2em
">
4824 Returns a number between or equal to low and high. If the receiver is equal to or between low and high, the reciever is returned. If the reciever is less than low, low is returned. If the receiver is greater than high, high is returned.
4829 <b><a name=Number-minutes ><font color=black>minutes </font></a></b><p>
4830 <div style="width:
40em; margin-left:
2em
">
4831 Returns Duration of receiver's minutes. See `years' for a few examples.
4836 <b><a name=Number-mod(aNumber)><font color=black>mod(aNumber)</font></a></b><p>
4837 <div style="width:
40em; margin-left:
2em
">
4838 Returns the receiver modulus aNumber.
4843 <b><a name=Number-nan ><font color=black>nan </font></a></b><p>
4844 <div style="width:
40em; margin-left:
2em
">
4845 Returns a infinity constant.
4850 <b><a name=Number-negate><font color=black>negate</font></a></b><p>
4851 <div style="width:
40em; margin-left:
2em
">
4852 Returns new number that is negated version of the receiver.
4857 <b><a name=Number-permutations(size)><font color=black>permutations(size)</font></a></b><p>
4858 <div style="width:
40em; margin-left:
2em
">
4859 Returns the permutations where the receiver is the number of different objects and size is the number to be arranged.
4864 <b><a name=Number-pi ><font color=black>pi </font></a></b><p>
4865 <div style="width:
40em; margin-left:
2em
">
4866 Returns the constant pi.
4871 <b><a name=Number-pow(aNumber)><font color=black>pow(aNumber)</font></a></b><p>
4872 <div style="width:
40em; margin-left:
2em
">
4873 Returns the value of the receiver to the aNumber power.
4878 <b><a name=Number-print><font color=black>print</font></a></b><p>
4879 <div style="width:
40em; margin-left:
2em
">
4885 <b><a name=Number-repeat(optionalIndex, expression)><font color=black>repeat(optionalIndex, expression)</font></a></b><p>
4886 <div style="width:
40em; margin-left:
2em
">
4887 Evaluates message a number of times that corresponds to the receivers
4888 integer value. This is significantly faster than a for() or while() loop.
4893 <b><a name=Number-round><font color=black>round</font></a></b><p>
4894 <div style="width:
40em; margin-left:
2em
">
4895 Returns the a number with the receiver's value rounded up to
4896 the nearest integer if it's fraction component is >= .5.
4901 <b><a name=Number-roundDown><font color=black>roundDown</font></a></b><p>
4902 <div style="width:
40em; margin-left:
2em
">
4903 Returns the a number with the receiver's value rounded down to
4904 the nearest integer if it's fraction component is <= .5.
4909 <b><a name=Number-seconds ><font color=black>seconds </font></a></b><p>
4910 <div style="width:
40em; margin-left:
2em
">
4911 Returns Duration of receiver's seconds. See `years' for a few examples.
4916 <b><a name=Number-shiftLeft(aNumber)><font color=black>shiftLeft(aNumber)</font></a></b><p>
4917 <div style="width:
40em; margin-left:
2em
">
4918 Shifts the bits of the receiver left by the number of places specified by aNumber.
4923 <b><a name=Number-shiftRight(aNumber)><font color=black>shiftRight(aNumber)</font></a></b><p>
4924 <div style="width:
40em; margin-left:
2em
">
4925 Shifts the bits of the receiver right by the number of places specified by aNumber.
4930 <b><a name=Number-shortMax><font color=black>shortMax</font></a></b><p>
4931 <div style="width:
40em; margin-left:
2em
">
4932 Returns the maximum short value.
4937 <b><a name=Number-shortMin><font color=black>shortMin</font></a></b><p>
4938 <div style="width:
40em; margin-left:
2em
">
4939 Returns the minimum short value.
4944 <b><a name=Number-sin><font color=black>sin</font></a></b><p>
4945 <div style="width:
40em; margin-left:
2em
">
4946 Returns the sine of the receiver.
4951 <b><a name=Number-sqrt><font color=black>sqrt</font></a></b><p>
4952 <div style="width:
40em; margin-left:
2em
">
4953 Returns the square root of the receiver.
4958 <b><a name=Number-squared><font color=black>squared</font></a></b><p>
4959 <div style="width:
40em; margin-left:
2em
">
4960 Returns the square of the receiver.
4965 <b><a name=Number-tan><font color=black>tan</font></a></b><p>
4966 <div style="width:
40em; margin-left:
2em
">
4967 Returns the tangent of the receiver.
4972 <b><a name=Number-toggle><font color=black>toggle</font></a></b><p>
4973 <div style="width:
40em; margin-left:
2em
">
4974 Returns 1 if the receiver is 0. Returns 0 otherwise.
4979 <b><a name=Number-unsignedIntMax><font color=black>unsignedIntMax</font></a></b><p>
4980 <div style="width:
40em; margin-left:
2em
">
4981 Returns the maximum unsigned int value.
4986 <b><a name=Number-unsignedLongMax><font color=black>unsignedLongMax</font></a></b><p>
4987 <div style="width:
40em; margin-left:
2em
">
4988 Returns the maximum unsigned long value.
4993 <b><a name=Number-unsignedShortMax><font color=black>unsignedShortMax</font></a></b><p>
4994 <div style="width:
40em; margin-left:
2em
">
4995 Returns the minimum unsigned int value.
5000 <b><a name=Number-years Returns Duration of receiver's years.><font color=black>years Returns Duration of receiver's years.</font></a></b><p>
5001 <div style="width:
40em; margin-left:
2em
">
5006 ==> 1 years 00 days 00:00:0.000000
5008 ==> 20 years 00 days 00:00:0.000000
5011 With this, you can do things such as:
5013 Io> Date clone now + 5 years
5014 ==> 2011-11-14 18:44:33 EST
5015 Io> Date clone now + 2 years + 3 days + 22 minutes
5016 ==> 2008-11-17 19:06:54 EST
5022 <b><a name=Number-|(aNumber)><font color=black>|(aNumber)</font></a></b><p>
5023 <div style="width:
40em; margin-left:
2em
">
5024 Returns a new number with the bitwise OR of the receiver and aNumber.
5033 <h2><a name=Object><font color=black>Object</font></a></h2>
5034 <ul style="width:
40em
">
5035 <b><font color=#000>Protos:</font></b> Object
5036 <h3>Description</h3>
5037 An Object is a key/value dictionary with string keys and values of any type.
5038 The prototype Object contains a clone slot that is a CFuntion that creates new objects.
5039 When cloned, an Object will call it's init slot (with no arguments).
5043 <div style="width:
40em; margin-left:
2em
">
5044 <b><a href=#Object-!=(aValue) >!=(aValue)</a></b><br>
5045 <b><a href=#Object-(expression) >(expression)</a></b><br>
5046 <b><a href=#Object--(aNumber) >-(aNumber)</a></b><br>
5047 <b><a href=#Object-..(arg) >..(arg)</a></b><br>
5048 <b><a href=#Object-<(expression) ><(expression)</a></b><br>
5049 <b><a href=#Object-<=(expression) ><=(expression)</a></b><br>
5050 <b><a href=#Object-==(aValue) >==(aValue)</a></b><br>
5051 <b><a href=#Object->(expression) >>(expression)</a></b><br>
5052 <b><a href=#Object->=(expression) >>=(expression)</a></b><br>
5053 <b><a href=#Object-?(aMessage) >?(aMessage)</a></b><br>
5054 <b><a href=#Object-ancestorWithSlot(slotName) >ancestorWithSlot(slotName)</a></b><br>
5055 <b><a href=#Object-ancestors >ancestors </a></b><br>
5056 <b><a href=#Object-appendProto(anObject) >appendProto(anObject)</a></b><br>
5057 <b><a href=#Object-break(optionalReturnValue) >break(optionalReturnValue)</a></b><br>
5058 <b><a href=#Object-clone >clone</a></b><br>
5059 <b><a href=#Object-cloneWithoutInit >cloneWithoutInit</a></b><br>
5060 <b><a href=#Object-compact >compact</a></b><br>
5061 <b><a href=#Object-compactState >compactState</a></b><br>
5062 <b><a href=#Object-compare(anObject) >compare(anObject)</a></b><br>
5063 <b><a href=#Object-contextWithSlot(slotName) >contextWithSlot(slotName)</a></b><br>
5064 <b><a href=#Object-continue >continue</a></b><br>
5065 <b><a href=#Object-do(expression) >do(expression)</a></b><br>
5066 <b><a href=#Object-doFile(pathString) >doFile(pathString)</a></b><br>
5067 <b><a href=#Object-doMessage(aMessage, optionalContext) >doMessage(aMessage, optionalContext)</a></b><br>
5068 <b><a href=#Object-doRelativeFile(pathString) >doRelativeFile(pathString)</a></b><br>
5069 <b><a href=#Object-doString(aString) >doString(aString)</a></b><br>
5070 <b><a href=#Object-evalArg(expression) >evalArg(expression)</a></b><br>
5071 <b><a href=#Object-evalArgAndReturnNil(expression) >evalArgAndReturnNil(expression)</a></b><br>
5072 <b><a href=#Object-evalArgAndReturnSelf(expression) >evalArgAndReturnSelf(expression)</a></b><br>
5073 <b><a href=#Object-for(<counter>, <start>, <end>, <do message>) >for(<counter>, <start>, <end>, <do message>)</a></b><br>
5074 <b><a href=#Object-foreach([name,] value, message) >foreach([name,] value, message)</a></b><br>
5075 <b><a href=#Object-forward >forward</a></b><br>
5076 <b><a href=#Object-getLocalSlot(slotNameString) >getLocalSlot(slotNameString)</a></b><br>
5077 <b><a href=#Object-getSlot(slotNameString) >getSlot(slotNameString)</a></b><br>
5078 <b><a href=#Object-hasLocalSlot(slotNameString) >hasLocalSlot(slotNameString)</a></b><br>
5079 <b><a href=#Object-hasProto(anObject) >hasProto(anObject)</a></b><br>
5080 <b><a href=#Object-if(<condition>, <trueMessage>, <optionalFalseMessage>) >if(<condition>, <trueMessage>, <optionalFalseMessage>)</a></b><br>
5081 <b><a href=#Object-in(aList) >in(aList)</a></b><br>
5082 <b><a href=#Object-isActivatable >isActivatable</a></b><br>
5083 <b><a href=#Object-isIdenticalTo(aValue) >isIdenticalTo(aValue)</a></b><br>
5084 <b><a href=#Object-isKindOf(anObject) >isKindOf(anObject)</a></b><br>
5085 <b><a href=#Object-isLaunchScript >isLaunchScript </a></b><br>
5086 <b><a href=#Object-launchFile(pathString) >launchFile(pathString)</a></b><br>
5087 <b><a href=#Object-list(...) >list(...)</a></b><br>
5088 <b><a href=#Object-localsForward >localsForward</a></b><br>
5089 <b><a href=#Object-localsUpdateSlot(slotNameString, valueObject) >localsUpdateSlot(slotNameString, valueObject)</a></b><br>
5090 <b><a href=#Object-loop(expression) >loop(expression)</a></b><br>
5091 <b><a href=#Object-memorySize >memorySize</a></b><br>
5092 <b><a href=#Object-memorySizeOfState >memorySizeOfState</a></b><br>
5093 <b><a href=#Object-message(expression) >message(expression)</a></b><br>
5094 <b><a href=#Object-newSlot(slotName, aValue) >newSlot(slotName, aValue)</a></b><br>
5095 <b><a href=#Object-perform(methodName, <arg1>, <arg2>, ...) >perform(methodName, <arg1>, <arg2>, ...)</a></b><br>
5096 <b><a href=#Object-performWithArgList(methodName, argList) >performWithArgList(methodName, argList)</a></b><br>
5097 <b><a href=#Object-prependProto(anObject) >prependProto(anObject)</a></b><br>
5098 <b><a href=#Object-print >print</a></b><br>
5099 <b><a href=#Object-println >println </a></b><br>
5100 <b><a href=#Object-proto >proto</a></b><br>
5101 <b><a href=#Object-protos >protos</a></b><br>
5102 <b><a href=#Object-relativeDoFile(pathString) >relativeDoFile(pathString)</a></b><br>
5103 <b><a href=#Object-removeAllProtos >removeAllProtos</a></b><br>
5104 <b><a href=#Object-removeAllSlots >removeAllSlots</a></b><br>
5105 <b><a href=#Object-removeProto(anObject) >removeProto(anObject)</a></b><br>
5106 <b><a href=#Object-removeSlot(slotNameString) >removeSlot(slotNameString)</a></b><br>
5107 <b><a href=#Object-resend >resend</a></b><br>
5108 <b><a href=#Object-return(anObject) >return(anObject)</a></b><br>
5109 <b><a href=#Object-returnIfNonNil >returnIfNonNil</a></b><br>
5110 <b><a href=#Object-self >self</a></b><br>
5111 <b><a href=#Object-setIsActivatable(aValue) >setIsActivatable(aValue)</a></b><br>
5112 <b><a href=#Object-setProto(anObject) >setProto(anObject)</a></b><br>
5113 <b><a href=#Object-setProtos(aList) >setProtos(aList)</a></b><br>
5114 <b><a href=#Object-setSlot(slotNameString, valueObject) >setSlot(slotNameString, valueObject)</a></b><br>
5115 <b><a href=#Object-setSlotWithType(slotNameString, valueObject) >setSlotWithType(slotNameString, valueObject)</a></b><br>
5116 <b><a href=#Object-shallowCopy >shallowCopy</a></b><br>
5117 <b><a href=#Object-slotNames >slotNames</a></b><br>
5118 <b><a href=#Object-slotValues >slotValues</a></b><br>
5119 <b><a href=#Object-stopStatus >stopStatus</a></b><br>
5120 <b><a href=#Object-super(aMessage) >super(aMessage)</a></b><br>
5121 <b><a href=#Object-switch(<key1>, <expression1>, <key2>, <expression2>, ...) >switch(<key1>, <expression1>, <key2>, <expression2>, ...) </a></b><br>
5122 <b><a href=#Object-tailCall(expression) >tailCall(expression)</a></b><br>
5123 <b><a href=#Object-thisLocalContext >thisLocalContext</a></b><br>
5124 <b><a href=#Object-thisMessage >thisMessage</a></b><br>
5125 <b><a href=#Object-type >type</a></b><br>
5126 <b><a href=#Object-uniqueId >uniqueId</a></b><br>
5127 <b><a href=#Object-updateSlot(slotNameString, valueObject) >updateSlot(slotNameString, valueObject)</a></b><br>
5128 <b><a href=#Object-while(<condition>, expression) >while(<condition>, expression)</a></b><br>
5129 <b><a href=#Object-write(<any number of arguments>) >write(<any number of arguments>)</a></b><br>
5130 <b><a href=#Object-writeln(<any number of arguments>) >writeln(<any number of arguments>)</a></b><br>
5135 <b><a name=Object-!=(aValue)><font color=black>!=(aValue)</font></a></b><p>
5136 <div style="width:
40em; margin-left:
2em
">
5137 Returns true the receiver is not equal to aValue, false otherwise.
5142 <b><a name=Object-(expression)><font color=black>(expression)</font></a></b><p>
5143 <div style="width:
40em; margin-left:
2em
">
5144 The '' method evaluates the argument and returns the result.
5149 <b><a name=Object--(aNumber)><font color=black>-(aNumber)</font></a></b><p>
5150 <div style="width:
40em; margin-left:
2em
">
5151 Returns the negative version of aNumber.
5152 Raises an exception if argument is not a number.
5157 <b><a name=Object-..(arg)><font color=black>..(arg)</font></a></b><p>
5158 <div style="width:
40em; margin-left:
2em
">
5159 .. is an alias for: method(arg, self asString append(arg asString))
5164 <b><a name=Object-<(expression)><font color=black><(expression)</font></a></b><p>
5165 <div style="width:
40em; margin-left:
2em
">
5166 Evaluates argument and returns self if self is less or Nil if not.
5171 <b><a name=Object-<=(expression)><font color=black><=(expression)</font></a></b><p>
5172 <div style="width:
40em; margin-left:
2em
">
5173 Evaluates argument and returns self if self is less
5174 than or equal to it, or Nil if not.
5179 <b><a name=Object-==(aValue)><font color=black>==(aValue)</font></a></b><p>
5180 <div style="width:
40em; margin-left:
2em
">
5181 Returns true if receiver and aValue are equal, false otherwise.
5186 <b><a name=Object->(expression)><font color=black>>(expression)</font></a></b><p>
5187 <div style="width:
40em; margin-left:
2em
">
5188 Evaluates argument and returns self if self is greater than it, or Nil if not.
5193 <b><a name=Object->=(expression)><font color=black>>=(expression)</font></a></b><p>
5194 <div style="width:
40em; margin-left:
2em
">
5195 Evaluates argument and returns self if self is greater
5196 than or equal to it, or Nil if not.
5201 <b><a name=Object-?(aMessage)><font color=black>?(aMessage)</font></a></b><p>
5202 <div style="width:
40em; margin-left:
2em
">
5203 description: Sends the message aMessage to the receiver if it can respond to it. Example:
5205 MyObject test // performs test
5206 MyObject ?test // performs test if MyObject has a slot named test
5208 The search for the slot only follows the receivers proto chain.
5213 <b><a name=Object-ancestorWithSlot(slotName)><font color=black>ancestorWithSlot(slotName)</font></a></b><p>
5214 <div style="width:
40em; margin-left:
2em
">
5215 Returns the first ancestor of the receiver that contains
5216 a slot of the specified name or Nil if none is found.
5221 <b><a name=Object-ancestors ><font color=black>ancestors </font></a></b><p>
5222 <div style="width:
40em; margin-left:
2em
">
5223 Returns a list of all of the receiver's ancestors as found by recursively following the protos links.
5228 <b><a name=Object-appendProto(anObject)><font color=black>appendProto(anObject)</font></a></b><p>
5229 <div style="width:
40em; margin-left:
2em
">
5230 Appends anObject to the receiver's proto list. Returns self.
5235 <b><a name=Object-break(optionalReturnValue)><font color=black>break(optionalReturnValue)</font></a></b><p>
5236 <div style="width:
40em; margin-left:
2em
">
5237 Break the current loop, if any.
5242 <b><a name=Object-clone><font color=black>clone</font></a></b><p>
5243 <div style="width:
40em; margin-left:
2em
">
5244 Returns a clone of the receiver.
5249 <b><a name=Object-cloneWithoutInit><font color=black>cloneWithoutInit</font></a></b><p>
5250 <div style="width:
40em; margin-left:
2em
">
5251 Returns a clone of the receiver but does not call init.
5256 <b><a name=Object-compact><font color=black>compact</font></a></b><p>
5257 <div style="width:
40em; margin-left:
2em
">
5258 Compact the memory for the object if possible. Returns self.
5263 <b><a name=Object-compactState><font color=black>compactState</font></a></b><p>
5264 <div style="width:
40em; margin-left:
2em
">
5265 Attempt to compact the memory of the IoState if possible.
5270 <b><a name=Object-compare(anObject)><font color=black>compare(anObject)</font></a></b><p>
5271 <div style="width:
40em; margin-left:
2em
">
5272 Returns a number containing the comparison value of the target with anObject.
5277 <b><a name=Object-contextWithSlot(slotName)><font color=black>contextWithSlot(slotName)</font></a></b><p>
5278 <div style="width:
40em; margin-left:
2em
">
5279 Returns the first context (starting with the receiver and following the lookup path)
5280 that contains a slot of the specified name or Nil if none is found.
5285 <b><a name=Object-continue><font color=black>continue</font></a></b><p>
5286 <div style="width:
40em; margin-left:
2em
">
5287 Skip the rest of the current loop iteration and start on
5293 <b><a name=Object-do(expression)><font color=black>do(expression)</font></a></b><p>
5294 <div style="width:
40em; margin-left:
2em
">
5295 Evaluates the message in the context of the receiver. Returns self.
5300 <b><a name=Object-doFile(pathString)><font color=black>doFile(pathString)</font></a></b><p>
5301 <div style="width:
40em; margin-left:
2em
">
5302 Evaluates the File in the context of the receiver. Returns the result.
5303 pathString is relative to the current working directory.
5308 <b><a name=Object-doMessage(aMessage, optionalContext)><font color=black>doMessage(aMessage, optionalContext)</font></a></b><p>
5309 <div style="width:
40em; margin-left:
2em
">
5310 Evaluates the message object in the context of the receiver.
5311 Returns the result. optionalContext can be used to specific the locals
5312 context in which the message is evaluated.
5317 <b><a name=Object-doRelativeFile(pathString)><font color=black>doRelativeFile(pathString)</font></a></b><p>
5318 <div style="width:
40em; margin-left:
2em
">
5319 Evaluates the File in the context of the receiver. Returns the result.
5320 pathString is relative to the file calling doRelativeFile. (Duplicate of relativeDoFile)
5325 <b><a name=Object-doString(aString)><font color=black>doString(aString)</font></a></b><p>
5326 <div style="width:
40em; margin-left:
2em
">
5327 Evaluates the string in the context of the receiver. Returns the result.
5332 <b><a name=Object-evalArg(expression)><font color=black>evalArg(expression)</font></a></b><p>
5333 <div style="width:
40em; margin-left:
2em
">
5334 The '' method evaluates the argument and returns the result.
5339 <b><a name=Object-evalArgAndReturnNil(expression)><font color=black>evalArgAndReturnNil(expression)</font></a></b><p>
5340 <div style="width:
40em; margin-left:
2em
">
5341 Evaluates the argument and returns nil.
5346 <b><a name=Object-evalArgAndReturnSelf(expression)><font color=black>evalArgAndReturnSelf(expression)</font></a></b><p>
5347 <div style="width:
40em; margin-left:
2em
">
5348 Evaluates the argument and returns the target.
5353 <b><a name=Object-for(<counter>, <start>, <end>, <do message>)><font color=black>for(<counter>, <start>, <end>, <do message>)</font></a></b><p>
5354 <div style="width:
40em; margin-left:
2em
">
5355 A for-loop control structure. See the io Programming Guide for a full description.
5360 <b><a name=Object-foreach([name,] value, message)><font color=black>foreach([name,] value, message)</font></a></b><p>
5361 <div style="width:
40em; margin-left:
2em
">
5362 For each slot, set name to the slot's
5363 name and value to the slot's value and execute message. Examples:
5366 myObject foreach(n, v,
5367 writeln("slot
", n, " =
", v type)
5371 writeln("slot type
", v type)
5378 <b><a name=Object-forward><font color=black>forward</font></a></b><p>
5379 <div style="width:
40em; margin-left:
2em
">
5380 Called when the receiver is sent a message it doesn't recognize.
5381 Default implementation raises an "Object doesNotRespond
" exception.
5382 Subclasses can override this method to implement proxies or special error handling.
5387 myProxy forward = method(
5388 messageName := thisMessage name
5389 arguments := thisMessage arguments
5390 myObject doMessage(thisMessage)
5397 <b><a name=Object-getLocalSlot(slotNameString)><font color=black>getLocalSlot(slotNameString)</font></a></b><p>
5398 <div style="width:
40em; margin-left:
2em
">
5399 Returns the value of the slot named slotNameString
5400 (not looking in the object's protos) or nil if no such slot is found.
5405 <b><a name=Object-getSlot(slotNameString)><font color=black>getSlot(slotNameString)</font></a></b><p>
5406 <div style="width:
40em; margin-left:
2em
">
5407 Returns the value of the slot named slotNameString
5408 (following the lookup path) or nil if no such slot is found.
5413 <b><a name=Object-hasLocalSlot(slotNameString)><font color=black>hasLocalSlot(slotNameString)</font></a></b><p>
5414 <div style="width:
40em; margin-left:
2em
">
5415 Returns true if the slot exists in the receiver or false otherwise.
5420 <b><a name=Object-hasProto(anObject)><font color=black>hasProto(anObject)</font></a></b><p>
5421 <div style="width:
40em; margin-left:
2em
">
5422 Returns true if anObject is found in the proto path of the target, false otherwise.
5427 <b><a name=Object-if(<condition>, <trueMessage>, <optionalFalseMessage>)><font color=black>if(<condition>, <trueMessage>, <optionalFalseMessage>)</font></a></b><p>
5428 <div style="width:
40em; margin-left:
2em
">
5429 Evaluates trueMessage if condition evaluates to a non-Nil.
5430 Otherwise evaluates optionalFalseMessage if it is present.
5431 Returns the result of the evaluated message or Nil if none was evaluated.
5436 <b><a name=Object-in(aList)><font color=black>in(aList)</font></a></b><p>
5437 <div style="width:
40em; margin-left:
2em
">
5438 Same as: aList contains(self)
5443 <b><a name=Object-isActivatable><font color=black>isActivatable</font></a></b><p>
5444 <div style="width:
40em; margin-left:
2em
">
5445 Returns true if the receiver is activatable, false otherwise.
5450 <b><a name=Object-isIdenticalTo(aValue)><font color=black>isIdenticalTo(aValue)</font></a></b><p>
5451 <div style="width:
40em; margin-left:
2em
">
5452 Returns true if the receiver is identical to aValue, false otherwise.
5457 <b><a name=Object-isKindOf(anObject)><font color=black>isKindOf(anObject)</font></a></b><p>
5458 <div style="width:
40em; margin-left:
2em
">
5459 Returns true if anObject is in the receiver's ancestors.
5464 <b><a name=Object-isLaunchScript ><font color=black>isLaunchScript </font></a></b><p>
5465 <div style="width:
40em; margin-left:
2em
">
5466 Returns true if the current file was run on the command line. Io's version of Python's __file__ == "__main__
"
5471 <b><a name=Object-launchFile(pathString)><font color=black>launchFile(pathString)</font></a></b><p>
5472 <div style="width:
40em; margin-left:
2em
">
5473 Eval file at pathString as if from the command line in it's folder.
5478 <b><a name=Object-list(...)><font color=black>list(...)</font></a></b><p>
5479 <div style="width:
40em; margin-left:
2em
">
5480 Returns a List containing the arguments.
5485 <b><a name=Object-localsForward><font color=black>localsForward</font></a></b><p>
5486 <div style="width:
40em; margin-left:
2em
">
5487 CFunction used by Locals prototype for forwarding.
5492 <b><a name=Object-localsUpdateSlot(slotNameString, valueObject)><font color=black>localsUpdateSlot(slotNameString, valueObject)</font></a></b><p>
5493 <div style="width:
40em; margin-left:
2em
">
5494 Local's version of updateSlot mthod.
5499 <b><a name=Object-loop(expression)><font color=black>loop(expression)</font></a></b><p>
5500 <div style="width:
40em; margin-left:
2em
">
5501 Keeps evaluating message until a break.
5506 <b><a name=Object-memorySize><font color=black>memorySize</font></a></b><p>
5507 <div style="width:
40em; margin-left:
2em
">
5508 Return the amount of memory used by the object.
5513 <b><a name=Object-memorySizeOfState><font color=black>memorySizeOfState</font></a></b><p>
5514 <div style="width:
40em; margin-left:
2em
">
5515 Returns the number of bytes in the IoState
5516 (this may not include memory allocated by C libraries).
5521 <b><a name=Object-message(expression)><font color=black>message(expression)</font></a></b><p>
5522 <div style="width:
40em; margin-left:
2em
">
5523 Return the message object for the argument or Nil if there is no argument.
5528 <b><a name=Object-newSlot(slotName, aValue)><font color=black>newSlot(slotName, aValue)</font></a></b><p>
5529 <div style="width:
40em; margin-left:
2em
">
5530 Creates a getter and setter for the slot with the name slotName
5531 and sets it's default the value aValue. Returns self. For example,
5532 newSlot("foo
", 1) would create slot named foo with the value 1 as well as a setter method setFoo().
5537 <b><a name=Object-perform(methodName, <arg1>, <arg2>, ...)><font color=black>perform(methodName, <arg1>, <arg2>, ...)</font></a></b><p>
5538 <div style="width:
40em; margin-left:
2em
">
5539 Performs the method corresponding to methodName with the arguments supplied.
5544 <b><a name=Object-performWithArgList(methodName, argList)><font color=black>performWithArgList(methodName, argList)</font></a></b><p>
5545 <div style="width:
40em; margin-left:
2em
">
5546 Performs the method corresponding to methodName with the arguments in the argList.
5551 <b><a name=Object-prependProto(anObject)><font color=black>prependProto(anObject)</font></a></b><p>
5552 <div style="width:
40em; margin-left:
2em
">
5553 Prepends anObject to the receiver's proto list. Returns self.
5558 <b><a name=Object-print><font color=black>print</font></a></b><p>
5559 <div style="width:
40em; margin-left:
2em
">
5560 Prints a string representation of the object. Returns Nil.
5565 <b><a name=Object-println ><font color=black>println </font></a></b><p>
5566 <div style="width:
40em; margin-left:
2em
">
5567 Same as print, but also prints a new line. Returns self.
5572 <b><a name=Object-proto><font color=black>proto</font></a></b><p>
5573 <div style="width:
40em; margin-left:
2em
">
5574 Same as; method(self protos first)
5579 <b><a name=Object-protos><font color=black>protos</font></a></b><p>
5580 <div style="width:
40em; margin-left:
2em
">
5581 Returns a copy of the receiver's protos list.
5586 <b><a name=Object-relativeDoFile(pathString)><font color=black>relativeDoFile(pathString)</font></a></b><p>
5587 <div style="width:
40em; margin-left:
2em
">
5588 Evaluates the File in the context of the receiver. Returns the result.
5589 pathString is relative to the file calling doRelativeFile. (Duplicate of doRelativeFile)
5594 <b><a name=Object-removeAllProtos><font color=black>removeAllProtos</font></a></b><p>
5595 <div style="width:
40em; margin-left:
2em
">
5596 Removes all of the receiver's protos. Returns self.
5601 <b><a name=Object-removeAllSlots><font color=black>removeAllSlots</font></a></b><p>
5602 <div style="width:
40em; margin-left:
2em
">
5603 Removes all of the receiver's slots. Returns self.
5608 <b><a name=Object-removeProto(anObject)><font color=black>removeProto(anObject)</font></a></b><p>
5609 <div style="width:
40em; margin-left:
2em
">
5610 Removes anObject from the receiver's proto list if it
5611 is present. Returns self.
5616 <b><a name=Object-removeSlot(slotNameString)><font color=black>removeSlot(slotNameString)</font></a></b><p>
5617 <div style="width:
40em; margin-left:
2em
">
5618 Removes the specified slot (only) in the receiver if it exists. Returns self.
5623 <b><a name=Object-resend><font color=black>resend</font></a></b><p>
5624 <div style="width:
40em; margin-left:
2em
">
5625 Send the message used to activate the current method to the Object's proto.
5628 Dog := Mammal clone do(
5634 calling Dog init will send an init method to Mammal, but using the Dog's context.
5639 <b><a name=Object-return(anObject)><font color=black>return(anObject)</font></a></b><p>
5640 <div style="width:
40em; margin-left:
2em
">
5641 Return anObject from the current execution block.
5646 <b><a name=Object-returnIfNonNil><font color=black>returnIfNonNil</font></a></b><p>
5647 <div style="width:
40em; margin-left:
2em
">
5648 Returns the receiver from the current execution block if it is non nil.
5649 Otherwise returns the receiver locally.
5654 <b><a name=Object-self><font color=black>self</font></a></b><p>
5655 <div style="width:
40em; margin-left:
2em
">
5661 <b><a name=Object-setIsActivatable(aValue)><font color=black>setIsActivatable(aValue)</font></a></b><p>
5662 <div style="width:
40em; margin-left:
2em
">
5663 When called with a non-Nil aValue, sets the object
5664 to call it's activate slot when accessed as a value. Turns this behavior
5665 off if aValue is Nil. Only works on Objects which are not Activatable
5666 Primitives (such as CFunction or Block). Returns self.
5671 <b><a name=Object-setProto(anObject)><font color=black>setProto(anObject)</font></a></b><p>
5672 <div style="width:
40em; margin-left:
2em
">
5673 Sets the first proto of the receiver to anObject, replacing the
5674 current one, if any. Returns self.
5679 <b><a name=Object-setProtos(aList)><font color=black>setProtos(aList)</font></a></b><p>
5680 <div style="width:
40em; margin-left:
2em
">
5681 Replaces the receiver's protos with a copy of aList. Returns self.
5686 <b><a name=Object-setSlot(slotNameString, valueObject)><font color=black>setSlot(slotNameString, valueObject)</font></a></b><p>
5687 <div style="width:
40em; margin-left:
2em
">
5688 Sets the slot slotNameString in the receiver to
5689 hold valueObject. Returns valueObject.
5694 <b><a name=Object-setSlotWithType(slotNameString, valueObject)><font color=black>setSlotWithType(slotNameString, valueObject)</font></a></b><p>
5695 <div style="width:
40em; margin-left:
2em
">
5696 Sets the slot slotNameString in the receiver to
5697 hold valueObject and sets the type slot of valueObject
5698 to be slotNameString. Returns valueObject.
5703 <b><a name=Object-shallowCopy><font color=black>shallowCopy</font></a></b><p>
5704 <div style="width:
40em; margin-left:
2em
">
5705 Returns a shallow copy of the receiver.
5710 <b><a name=Object-slotNames><font color=black>slotNames</font></a></b><p>
5711 <div style="width:
40em; margin-left:
2em
">
5712 Returns a list of strings containing the names of the
5713 slots in the receiver (but not in it's lookup path).
5718 <b><a name=Object-slotValues><font color=black>slotValues</font></a></b><p>
5719 <div style="width:
40em; margin-left:
2em
">
5720 Returns a list of the values held in the slots of the receiver.
5725 <b><a name=Object-stopStatus><font color=black>stopStatus</font></a></b><p>
5726 <div style="width:
40em; margin-left:
2em
">
5727 Returns the internal IoState->stopStatus.
5732 <b><a name=Object-super(aMessage)><font color=black>super(aMessage)</font></a></b><p>
5733 <div style="width:
40em; margin-left:
2em
">
5734 Sends the message aMessage to the receiver's proto with the context of self. Example:
5736 self test(1, 2) // performs test(1, 2) on self
5737 super(test(1, 2)) // performs test(1, 2) on self proto but with the context of self
5743 <b><a name=Object-switch(<key1>, <expression1>, <key2>, <expression2>, ...) ><font color=black>switch(<key1>, <expression1>, <key2>, <expression2>, ...) </font></a></b><p>
5744 <div style="width:
40em; margin-left:
2em
">
5745 Execute an expression depending on the value of the caller. (This is an equivalent to C switch/case)
5747 hour := Date hour switch(
5758 <b><a name=Object-tailCall(expression)><font color=black>tailCall(expression)</font></a></b><p>
5759 <div style="width:
40em; margin-left:
2em
">
5760 Does a tailCall on the currently executing Block. Example:
5762 Io> a := method(x, x = x + 1; if(x > 10, return x); tailCall(x))
5763 ==> method(x, updateSlot("x
", x +(1));
5764 if(x >(10), return(x));
5773 <b><a name=Object-thisLocalContext><font color=black>thisLocalContext</font></a></b><p>
5774 <div style="width:
40em; margin-left:
2em
">
5775 Returns current locals.
5780 <b><a name=Object-thisMessage><font color=black>thisMessage</font></a></b><p>
5781 <div style="width:
40em; margin-left:
2em
">
5782 Returns the calling message.
5787 <b><a name=Object-type><font color=black>type</font></a></b><p>
5788 <div style="width:
40em; margin-left:
2em
">
5789 Returns a string containing the name of the type of Object (Number, String, etc).
5794 <b><a name=Object-uniqueId><font color=black>uniqueId</font></a></b><p>
5795 <div style="width:
40em; margin-left:
2em
">
5796 Returns a Number containing a unique id for the receiver.
5801 <b><a name=Object-updateSlot(slotNameString, valueObject)><font color=black>updateSlot(slotNameString, valueObject)</font></a></b><p>
5802 <div style="width:
40em; margin-left:
2em
">
5803 Same as setSlot(), but raises an error if the slot does not
5804 already exist in the receiver's slot lookup path.
5809 <b><a name=Object-while(<condition>, expression)><font color=black>while(<condition>, expression)</font></a></b><p>
5810 <div style="width:
40em; margin-left:
2em
">
5811 Keeps evaluating message until condition return Nil.
5812 Returns the result of the last message evaluated or Nil if none were evaluated.
5817 <b><a name=Object-write(<any number of arguments>)><font color=black>write(<any number of arguments>)</font></a></b><p>
5818 <div style="width:
40em; margin-left:
2em
">
5819 Sends a print message to the evaluated result of each argument. Returns Nil.
5824 <b><a name=Object-writeln(<any number of arguments>)><font color=black>writeln(<any number of arguments>)</font></a></b><p>
5825 <div style="width:
40em; margin-left:
2em
">
5826 Same as write() but also writes a return character at the end. Returns Nil.
5835 <h2><a name=Path><font color=black>Path</font></a></h2>
5836 <ul style="width:
40em
">
5837 <b><font color=#000>Protos:</font></b> Object
5839 <div style="width:
40em; margin-left:
2em
">
5840 <b><a href=#Path-absolute >absolute </a></b><br>
5841 <b><a href=#Path-hasDriveLetters >hasDriveLetters </a></b><br>
5842 <b><a href=#Path-isPathAbsolute >isPathAbsolute </a></b><br>
5843 <b><a href=#Path-with(aSequence) >with(aSequence)</a></b><br>
5848 <b><a name=Path-absolute ><font color=black>absolute </font></a></b><p>
5849 <div style="width:
40em; margin-left:
2em
">
5850 Returns an absolute version of the path.
5855 <b><a name=Path-hasDriveLetters ><font color=black>hasDriveLetters </font></a></b><p>
5856 <div style="width:
40em; margin-left:
2em
">
5857 returns true if the platform requires DOS C: style drive letters.
5862 <b><a name=Path-isPathAbsolute ><font color=black>isPathAbsolute </font></a></b><p>
5863 <div style="width:
40em; margin-left:
2em
">
5864 Returns true if path is absolute, false if it is relative.
5869 <b><a name=Path-with(aSequence)><font color=black>with(aSequence)</font></a></b><p>
5870 <div style="width:
40em; margin-left:
2em
">
5871 Returns a new Path object for the given Sequence.
5880 <h2><a name=Sandbox><font color=black>Sandbox</font></a></h2>
5881 <ul style="width:
40em
">
5882 <b><font color=#000>Protos:</font></b> Object
5883 <h3>Description</h3>
5884 Sandbox can be used to run separate instances of Io within the same process.
5888 <div style="width:
40em; margin-left:
2em
">
5889 <b><a href=#Sandbox-doSandboxString(aString) >doSandboxString(aString)</a></b><br>
5890 <b><a href=#Sandbox-messageCount >messageCount</a></b><br>
5891 <b><a href=#Sandbox-printCallback(string) >printCallback(string)</a></b><br>
5892 <b><a href=#Sandbox-setMessageCount(anInteger) >setMessageCount(anInteger)</a></b><br>
5893 <b><a href=#Sandbox-setTimeLimit(aDouble) >setTimeLimit(aDouble)</a></b><br>
5894 <b><a href=#Sandbox-timeLimit >timeLimit</a></b><br>
5899 <b><a name=Sandbox-doSandboxString(aString)><font color=black>doSandboxString(aString)</font></a></b><p>
5900 <div style="width:
40em; margin-left:
2em
">
5901 Evaluate aString inside the Sandbox.
5906 <b><a name=Sandbox-messageCount><font color=black>messageCount</font></a></b><p>
5907 <div style="width:
40em; margin-left:
2em
">
5908 Returns a number containing the messageCount limit of the Sandbox.
5913 <b><a name=Sandbox-printCallback(string)><font color=black>printCallback(string)</font></a></b><p>
5914 <div style="width:
40em; margin-left:
2em
">
5915 default implementation is; method(string, string print)
5920 <b><a name=Sandbox-setMessageCount(anInteger)><font color=black>setMessageCount(anInteger)</font></a></b><p>
5921 <div style="width:
40em; margin-left:
2em
">
5922 Sets the messageCount limit of the receiver.
5927 <b><a name=Sandbox-setTimeLimit(aDouble)><font color=black>setTimeLimit(aDouble)</font></a></b><p>
5928 <div style="width:
40em; margin-left:
2em
">
5929 Sets the time limit of the Sandbox.
5934 <b><a name=Sandbox-timeLimit><font color=black>timeLimit</font></a></b><p>
5935 <div style="width:
40em; margin-left:
2em
">
5936 Returns a number containing the time limit of calls made to the Sandbox.
5945 <h2><a name=Scheduler><font color=black>Scheduler</font></a></h2>
5946 <ul style="width:
40em
">
5947 <b><font color=#000>Protos:</font></b> Object
5949 <div style="width:
40em; margin-left:
2em
">
5950 <b><a href=#Scheduler-currentCoroutine >currentCoroutine </a></b><br>
5951 <b><a href=#Scheduler-setTimers(aListOfTimers) >setTimers(aListOfTimers)</a></b><br>
5952 <b><a href=#Scheduler-setYieldingCoros(aListOfCoros) >setYieldingCoros(aListOfCoros)</a></b><br>
5953 <b><a href=#Scheduler-timers >timers </a></b><br>
5954 <b><a href=#Scheduler-yieldingCoros >yieldingCoros </a></b><br>
5959 <b><a name=Scheduler-currentCoroutine ><font color=black>currentCoroutine </font></a></b><p>
5960 <div style="width:
40em; margin-left:
2em
">
5961 Returns the currently running coroutine.
5966 <b><a name=Scheduler-setTimers(aListOfTimers)><font color=black>setTimers(aListOfTimers)</font></a></b><p>
5967 <div style="width:
40em; margin-left:
2em
">
5968 Sets the list of active timers.
5973 <b><a name=Scheduler-setYieldingCoros(aListOfCoros)><font color=black>setYieldingCoros(aListOfCoros)</font></a></b><p>
5974 <div style="width:
40em; margin-left:
2em
">
5975 Sets the list of yielding Coroutine objects.
5980 <b><a name=Scheduler-timers ><font color=black>timers </font></a></b><p>
5981 <div style="width:
40em; margin-left:
2em
">
5982 The List of active timers.
5987 <b><a name=Scheduler-yieldingCoros ><font color=black>yieldingCoros </font></a></b><p>
5988 <div style="width:
40em; margin-left:
2em
">
5989 The List of yielding Coroutine objects.
5998 <h2><a name=Sequence><font color=black>Sequence</font></a></h2>
5999 <ul style="width:
40em
">
6000 <b><font color=#000>Protos:</font></b> Object
6001 <h3>Description</h3>
6002 A Sequence is a container for a list of data elements. Typically these elements are each 1 byte in size. A Sequence can be either mutable or immutable. When immutable, only the read-only methods can be used.
6006 <li> Buffer: A mutable Sequence of single byte elements, typically in a binary encoding
6007 <li> Symbol or String: A unique immutable Sequence, typically in a character encoding
6012 <div style="width:
40em; margin-left:
2em
">
6013 <b><a href=#Sequence-alignCenter(width, [padding]) "" >alignCenter(width, [padding]) ""</a></b><br>
6014 <b><a href=#Sequence-alignLeft(width, [padding]) >alignLeft(width, [padding]) </a></b><br>
6015 <b><a href=#Sequence-alignLeftInPlace(width, [padding]) >alignLeftInPlace(width, [padding])</a></b><br>
6016 <b><a href=#Sequence-alignRight(width, [padding]) >alignRight(width, [padding]) </a></b><br>
6017 <b><a href=#Sequence-asFile >asFile </a></b><br>
6018 <b><a href=#Sequence-asHex >asHex </a></b><br>
6019 <b><a href=#Sequence-findNthSeq(aSequence, n) >findNthSeq(aSequence, n)</a></b><br>
6020 <b><a href=#Sequence-prependSeq(object1, object2, ...) >prependSeq(object1, object2, ...)</a></b><br>
6021 <b><a href=#Sequence-repeated(n) >repeated(n)</a></b><br>
6022 <b><a href=#Sequence-split(optionalArg1, optionalArg2, ...) >split(optionalArg1, optionalArg2, ...)</a></b><br>
6027 <b><a name=Sequence-alignCenter(width, [padding]) ""><font color=black>alignCenter(width, [padding]) ""</font></a></b><p>
6028 <div style="width:
40em; margin-left:
2em
">
6031 Io> "abc
" alignCenter(10, "-
")
6033 Io> "abc
" alignCenter(10, "-=
")
6040 <b><a name=Sequence-alignLeft(width, [padding]) ><font color=black>alignLeft(width, [padding]) </font></a></b><p>
6041 <div style="width:
40em; margin-left:
2em
">
6045 Io> "abc
" alignLeft(10, "+
")
6047 Io> "abc
" alignLeft(10, "-=
")
6054 <b><a name=Sequence-alignLeftInPlace(width, [padding])><font color=black>alignLeftInPlace(width, [padding])</font></a></b><p>
6055 <div style="width:
40em; margin-left:
2em
">
6056 Same as align left but operation is performed on the receiver.
6061 <b><a name=Sequence-alignRight(width, [padding]) ><font color=black>alignRight(width, [padding]) </font></a></b><p>
6062 <div style="width:
40em; margin-left:
2em
">
6066 Io> "abc
" alignRight(10, "-
")
6068 Io> "abc
" alignRight(10, "-=
")
6075 <b><a name=Sequence-asFile ><font color=black>asFile </font></a></b><p>
6076 <div style="width:
40em; margin-left:
2em
">
6077 Returns a new File object with the receiver as it's path.
6082 <b><a name=Sequence-asHex ><font color=black>asHex </font></a></b><p>
6083 <div style="width:
40em; margin-left:
2em
">
6084 Returns a hex string for the receiving sequence, e.g., \"abc\
" asHex -> \"616263\
".")
6089 <b><a name=Sequence-findNthSeq(aSequence, n)
><font color=black
>findNthSeq(aSequence, n)
</font></a></b><p>
6090 <div style=
"width:40em; margin-left:2em">
6091 Returns a number with the nth occurence of aSequence
")
6096 <b><a name=Sequence-prependSeq(object1, object2, ...)><font color=black>prependSeq(object1, object2, ...)</font></a></b><p>
6097 <div style="width:
40em; margin-left:
2em
">
6098 Prepends given objects asString in reverse order to the receiver. Returns self.")
6103 <b><a name=Sequence-repeated(n)
><font color=black
>repeated(n)
</font></a></b><p>
6104 <div style=
"width:40em; margin-left:2em">
6105 Returns a new sequence containing the receiver repeated n number of times.
6110 <b><a name=Sequence-split(optionalArg1, optionalArg2, ...)
><font color=black
>split(optionalArg1, optionalArg2, ...)
</font></a></b><p>
6111 <div style=
"width:40em; margin-left:2em">
6112 Returns a list containing the non-empty sub-sequences of the receiver divided by the given arguments.
6113 If no arguments are given the sequence is split on white space.
6116 "a b c d" splitNoEmpties =
> list(
"a",
"b",
"c",
"d")
6117 "a***b**c*d" splitNoEmpties(
"*") =
> list(
"a",
"b",
"c",
"d")
6118 "a***b||c,d" splitNoEmpties(
"*",
"|",
",") =
> list(
"a",
"b",
"c",
"d")
6128 <h2><a name=State
><font color=black
>State
</font></a></h2>
6129 <ul style=
"width:40em">
6130 <b><font color=#
000>Protos:
</font></b> Object
6132 <div style=
"width:40em; margin-left:2em">
6141 <h2><a name=System
><font color=black
>System
</font></a></h2>
6142 <ul style=
"width:40em">
6143 <b><font color=#
000>Protos:
</font></b> Object
6145 <div style=
"width:40em; margin-left:2em">
6146 <b><a href=#System-activeCpus
>activeCpus
</a></b><br>
6147 <b><a href=#System-args
>args
</a></b><br>
6148 <b><a href=#System-distribution
>distribution
</a></b><br>
6149 <b><a href=#System-errorNumber
>errorNumber
</a></b><br>
6150 <b><a href=#System-exit(optionalReturnCodeNumber)
>exit(optionalReturnCodeNumber)
</a></b><br>
6151 <b><a href=#System-getEnvironmentVariable(nameString)
>getEnvironmentVariable(nameString)
</a></b><br>
6152 <b><a href=#System-getOptions(args)
>getOptions(args)
</a></b><br>
6153 <b><a href=#System-installPrefix
>installPrefix
</a></b><br>
6154 <b><a href=#System-ioPath
>ioPath
</a></b><br>
6155 <b><a href=#System-launchScript
>launchScript
</a></b><br>
6156 <b><a href=#System-maxRecycledObjects
>maxRecycledObjects
</a></b><br>
6157 <b><a href=#System-platform
>platform
</a></b><br>
6158 <b><a href=#System-platformVersion
>platformVersion
</a></b><br>
6159 <b><a href=#System-recycledObjectCount
>recycledObjectCount
</a></b><br>
6160 <b><a href=#System-setEnvironmentVariable(keyString, valueString)
>setEnvironmentVariable(keyString, valueString)
</a></b><br>
6161 <b><a href=#System-setLobby(anObject)
>setLobby(anObject)
</a></b><br>
6162 <b><a href=#System-setMaxRecycledObjects(aNumber)
>setMaxRecycledObjects(aNumber)
</a></b><br>
6163 <b><a href=#System-sleep(secondsNumber)
>sleep(secondsNumber)
</a></b><br>
6164 <b><a href=#System-symbols
>symbols
</a></b><br>
6165 <b><a href=#System-system(aString)
>system(aString)
</a></b><br>
6166 <b><a href=#System-version
>version
</a></b><br>
6171 <b><a name=System-activeCpus
><font color=black
>activeCpus
</font></a></b><p>
6172 <div style=
"width:40em; margin-left:2em">
6173 Returns the number of active CPUs.
6178 <b><a name=System-args
><font color=black
>args
</font></a></b><p>
6179 <div style=
"width:40em; margin-left:2em">
6180 Returns the list of command line argument strings the program was run with.
")
6185 <b><a name=System-distribution><font color=black>distribution</font></a></b><p>
6186 <div style="width:
40em; margin-left:
2em
">
6187 Returns the Io distribution name as a string.
6192 <b><a name=System-errorNumber><font color=black>errorNumber</font></a></b><p>
6193 <div style="width:
40em; margin-left:
2em
">
6194 Returns the C errno string.
6199 <b><a name=System-exit(optionalReturnCodeNumber)><font color=black>exit(optionalReturnCodeNumber)</font></a></b><p>
6200 <div style="width:
40em; margin-left:
2em
">
6201 Shutdown the IoState (io_free all objects) and return
6202 control to the calling program (if any).
6207 <b><a name=System-getEnvironmentVariable(nameString)><font color=black>getEnvironmentVariable(nameString)</font></a></b><p>
6208 <div style="width:
40em; margin-left:
2em
">
6209 Returns a string with the value of the environment
6210 variable whose name is specified by nameString.
6215 <b><a name=System-getOptions(args) ><font color=black>getOptions(args) </font></a></b><p>
6216 <div style="width:
40em; margin-left:
2em
">
6217 This primitive is used to get command line options similar to Cs getopt().
6218 It returns a map in containing the left side of the argument, with the
6219 value of the right side. (The key will not contain
6220 the beginning dashes (--).
6224 options := System getOptions(args)
6225 options foreach(k, v,
6226 if(v type == List type,
6227 v foreach(i, j, writeln(\"Got unnamed argument with value: \
" .. j))
6230 writeln(\"Got option: \
" .. k .. \" with value: \
" .. v)
6237 <b><a name=System-installPrefix><font color=black>installPrefix</font></a></b><p>
6238 <div style="width:
40em; margin-left:
2em
">
6239 Returns the root path where io was install. The default is /usr/local.
6244 <b><a name=System-ioPath ><font color=black>ioPath </font></a></b><p>
6245 <div style="width:
40em; margin-left:
2em
">
6246 Returns the path of io installation. The default is $INSTALL_PREFIX/lib/io.
6251 <b><a name=System-launchScript ><font color=black>launchScript </font></a></b><p>
6252 <div style="width:
40em; margin-left:
2em
">
6253 Returns the path of the io file run on the command line. Returns nil if no file was run.
6258 <b><a name=System-maxRecycledObjects><font color=black>maxRecycledObjects</font></a></b><p>
6259 <div style="width:
40em; margin-left:
2em
">
6260 Returns the max number of recycled objects used.
6265 <b><a name=System-platform><font color=black>platform</font></a></b><p>
6266 <div style="width:
40em; margin-left:
2em
">
6267 Returns a string description of the platform.
6272 <b><a name=System-platformVersion><font color=black>platformVersion</font></a></b><p>
6273 <div style="width:
40em; margin-left:
2em
">
6274 Returns the version id of the OS.
6279 <b><a name=System-recycledObjectCount><font color=black>recycledObjectCount</font></a></b><p>
6280 <div style="width:
40em; margin-left:
2em
">
6281 Returns the current number of objects being held for recycling.
6286 <b><a name=System-setEnvironmentVariable(keyString, valueString)><font color=black>setEnvironmentVariable(keyString, valueString)</font></a></b><p>
6287 <div style="width:
40em; margin-left:
2em
">
6288 Sets the environment variable keyString to the value valueString.
6293 <b><a name=System-setLobby(anObject)><font color=black>setLobby(anObject)</font></a></b><p>
6294 <div style="width:
40em; margin-left:
2em
">
6295 Sets the root object of the garbage collector.
6300 <b><a name=System-setMaxRecycledObjects(aNumber)><font color=black>setMaxRecycledObjects(aNumber)</font></a></b><p>
6301 <div style="width:
40em; margin-left:
2em
">
6302 Sets the max number of recycled objects used.
6307 <b><a name=System-sleep(secondsNumber)><font color=black>sleep(secondsNumber)</font></a></b><p>
6308 <div style="width:
40em; margin-left:
2em
">
6309 Performs a *blocking* sleep call for specified number of seconds.
6314 <b><a name=System-symbols><font color=black>symbols</font></a></b><p>
6315 <div style="width:
40em; margin-left:
2em
">
6316 Returns a List containing all Symbols currently in the system.
6321 <b><a name=System-system(aString)><font color=black>system(aString)</font></a></b><p>
6322 <div style="width:
40em; margin-left:
2em
">
6323 Makes a system call and returns a Number for the return value.
6328 <b><a name=System-version><font color=black>version</font></a></b><p>
6329 <div style="width:
40em; margin-left:
2em
">
6330 Returns a version number for Io.
6339 <h2><a name=Tag><font color=black>Tag</font></a></h2>
6340 <ul style="width:
40em
">
6341 <b><font color=#000>Protos:</font></b> Object
6343 <div style="width:
40em; margin-left:
2em
">
6352 <h2><a name=Token><font color=black>Token</font></a></h2>
6353 <ul style="width:
40em
">
6354 <b><font color=#000>Protos:</font></b> Object
6356 <div style="width:
40em; margin-left:
2em
">
6365 <h2><a name=UnitTest><font color=black>UnitTest</font></a></h2>
6366 <ul style="width:
40em
">
6367 <b><font color=#000>Protos:</font></b> Object
6369 <div style="width:
40em; margin-left:
2em
">
6370 <b><a href=#UnitTest-category >category </a></b><br>
6375 <b><a name=UnitTest-category ><font color=black>category </font></a></b><p>
6376 <div style="width:
40em; margin-left:
2em
">
6386 <h2><a name=WeakLink><font color=black>WeakLink</font></a></h2>
6387 <ul style="width:
40em
">
6388 <b><font color=#000>Protos:</font></b> Object
6389 <h3>Description</h3>
6390 A WeakLink is a primitive that can hold a reference to
6391 an object without preventing the garbage collector from
6392 collecting it. The link reference is set with the setLink() method.
6393 After the garbage collector collects an object, it informs any
6394 (uncollected) WeakLink objects whose link value pointed to that
6395 object by calling their "collectedLink
" method.
6399 <div style="width:
40em; margin-left:
2em
">
6400 <b><a href=#WeakLink-link >link</a></b><br>
6401 <b><a href=#WeakLink-setLink(aValue) >setLink(aValue)</a></b><br>
6406 <b><a name=WeakLink-link><font color=black>link</font></a></b><p>
6407 <div style="width:
40em; margin-left:
2em
">
6408 Returns the link pointer or Nil if none is set.
6413 <b><a name=WeakLink-setLink(aValue)><font color=black>setLink(aValue)</font></a></b><p>
6414 <div style="width:
40em; margin-left:
2em
">
6415 Sets the link pointer. Returns self.
6424 <h2><a name=nil><font color=black>nil</font></a></h2>
6425 <ul style="width:
40em
">
6426 <b><font color=#000>Protos:</font></b> Object
6428 <div style="width:
40em; margin-left:
2em
">
6429 <b><a href=#nil-and(expression) >and(expression)</a></b><br>
6430 <b><a href=#nil-clone >clone </a></b><br>
6431 <b><a href=#nil-else(expression) >else(expression)</a></b><br>
6432 <b><a href=#nil-ifNil(expression) >ifNil(expression)</a></b><br>
6433 <b><a href=#nil-isNil >isNil </a></b><br>
6434 <b><a href=#nil-or(anObject) >or(anObject)</a></b><br>
6435 <b><a href=#nil-print >print </a></b><br>
6436 <b><a href=#nil-then(expression) >then(expression)</a></b><br>
6441 <b><a name=nil-and(expression)><font color=black>and(expression)</font></a></b><p>
6442 <div style="width:
40em; margin-left:
2em
">
6443 Returns nil without evaluating expression.
6448 <b><a name=nil-clone ><font color=black>clone </font></a></b><p>
6449 <div style="width:
40em; margin-left:
2em
">
6450 returns self since nil is a singleton.
6455 <b><a name=nil-else(expression)><font color=black>else(expression)</font></a></b><p>
6456 <div style="width:
40em; margin-left:
2em
">
6457 Returns nil without evaluating expression.
6462 <b><a name=nil-ifNil(expression)><font color=black>ifNil(expression)</font></a></b><p>
6463 <div style="width:
40em; margin-left:
2em
">
6469 <b><a name=nil-isNil ><font color=black>isNil </font></a></b><p>
6470 <div style="width:
40em; margin-left:
2em
">
6476 <b><a name=nil-or(anObject)><font color=black>or(anObject)</font></a></b><p>
6477 <div style="width:
40em; margin-left:
2em
">
6478 Returns anObject if anObject is not nil. Otherwise returns nil.
6483 <b><a name=nil-print ><font color=black>print </font></a></b><p>
6484 <div style="width:
40em; margin-left:
2em
">
6485 Prints 'nil'. Returns self.
6490 <b><a name=nil-then(expression)><font color=black>then(expression)</font></a></b><p>
6491 <div style="width:
40em; margin-left:
2em
">
6492 Returns nil without evaluating expression.
6501 <h2><a name=true><font color=black>true</font></a></h2>
6502 <ul style="width:
40em
">
6503 <b><font color=#000>Protos:</font></b> Object
6505 <div style="width:
40em; margin-left:
2em
">
6506 <b><a href=#true-and >and </a></b><br>
6507 <b><a href=#true-asSimpleString >asSimpleString </a></b><br>
6508 <b><a href=#true-asString >asString </a></b><br>
6509 <b><a href=#true-clone >clone </a></b><br>
6510 <b><a href=#true-else >else </a></b><br>
6511 <b><a href=#true-elseif >elseif </a></b><br>
6512 <b><a href=#true-ifFalse >ifFalse </a></b><br>
6513 <b><a href=#true-ifTrue >ifTrue </a></b><br>
6514 <b><a href=#true-not >not </a></b><br>
6515 <b><a href=#true-or >or </a></b><br>
6516 <b><a href=#true-then >then </a></b><br>
6521 <b><a name=true-and ><font color=black>and </font></a></b><p>
6522 <div style="width:
40em; margin-left:
2em
">
6523 Evaluates the argument and returns the result.
6528 <b><a name=true-asSimpleString ><font color=black>asSimpleString </font></a></b><p>
6529 <div style="width:
40em; margin-left:
2em
">
6535 <b><a name=true-asString ><font color=black>asString </font></a></b><p>
6536 <div style="width:
40em; margin-left:
2em
">
6542 <b><a name=true-clone ><font color=black>clone </font></a></b><p>
6543 <div style="width:
40em; margin-left:
2em
">
6549 <b><a name=true-else ><font color=black>else </font></a></b><p>
6550 <div style="width:
40em; margin-left:
2em
">
6551 Does not eval argument and returns true.
6556 <b><a name=true-elseif ><font color=black>elseif </font></a></b><p>
6557 <div style="width:
40em; margin-left:
2em
">
6558 Does not eval argument and returns true.
6563 <b><a name=true-ifFalse ><font color=black>ifFalse </font></a></b><p>
6564 <div style="width:
40em; margin-left:
2em
">
6565 Does not eval argument and returns true.
6570 <b><a name=true-ifTrue ><font color=black>ifTrue </font></a></b><p>
6571 <div style="width:
40em; margin-left:
2em
">
6572 Evaluates the argument and returns self.
6577 <b><a name=true-not ><font color=black>not </font></a></b><p>
6578 <div style="width:
40em; margin-left:
2em
">
6579 Does not eval argument and returns false.
6584 <b><a name=true-or ><font color=black>or </font></a></b><p>
6585 <div style="width:
40em; margin-left:
2em
">
6586 Does not eval argument and returns true.
6591 <b><a name=true-then ><font color=black>then </font></a></b><p>
6592 <div style="width:
40em; margin-left:
2em
">
6593 Evaluates the argument and returns nil.