Message-ID: <792064918.3031.1369348964513.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3030_1525786535.1369348964512" ------=_Part_3030_1525786535.1369348964512 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Here is a summary of boo's built-in functions. The actual source= code underlying these functions is in Boo/Lang/Builtins.cs.
array is a function used to create empty arrays or= convert IEnumerable and ICollection objects to arrays. See Lists And Arrays for more info.
Converts an IEnumerable object to a non-specific (type of Syste= m.Object) array.
Co= nverts any object that implements ICollection to an array of Type.
Converts any object that im= pelements IEnumerable to an array of Type.
Crea= tes an empty array of the specified size.
BooVersion is a builtin property that ret= urns the current version of boo that is running. It returns a System.Versio= n class. See Getting Boo Versi= on for more info.
enumerate() is useful when you want to keep a running count while loop= ing through items using a for loop:
mylist = =3D ["a", "b", "c"] for i as int, obj in enumerate(mylist): print i, ":", obj=09=09
Returns a s= tring of input that originates from Console.ReadLine() - AKA, "Standar= d Input."
The= equivilent of Console.ReadLine(). See also prompt() below.
Usually not necessary, this builtin returns any Enum= erator it can find in the object passed. For loops do this for you.
Always returning a string, = join is a function that will walk through an enumerable object and put all = of those elements into one string.
Joins all = of the elements in enumerable into one string, using a single space (ASCII = Code: 32) between elements.
The same as join(enumerable as IEnumerable), except that s= eperator defines what character seperates each element in enumerable.
map returns an enumerable o= bject that applies a specific function to each element in an enumerable obj= ect.
= Taking an enumerable object such as a list or a collection, it returns an I= Enumerable object that applies "function" to each element in the = array.
See Multidimensional Arrays f= or more info, but here is a basic example:
Creates a multidimensional array of = type elementType with the specifications of length.
Prints an= object to Standard Out. The equivilent of Console.WriteLine
= The equivilent of Console.WriteLine()
Prompts the user for information.
Print= s query to standard output, then waits for a user to 'respond.' Returns a s= tring containing what the user has typed.
A mysterious, somewhat exciting function that retur= ns an enumerable object containing a list of elements such as 1 to 10 or 0 = to 5 or 77 to 6.
Returns an IEnumerable object that contains elements fro= m 0 to max - 1.
Returns an IEnumerable object that conta= ins elements from begin to end - 1.
Returns an IEnumerable object that contains all of the elements fr= om begin to end - 1 that match the interval of step.
Returns items in an enumerab= le in reverse order.
shell is used for invoking processes and inspecting their output.
Invoke an application (fi= lename) with the arguments (arguments) specified. Returns a string containi= ng the program's output to Standard Out (aka, the console)
Invoke an application (filenam= e) with an array of arguments (arguments); returns a string containing prog= ram's output.
Sta= rts a process specified by filename with the arguments provided and returns= a Process object representing the newly born process.
zip returns an IEnumerable object that int= erleaves the two arrays.
zip will return an IEnumerable object, wherein each element of th= e IEnumerable object will be a one dimensional array containing two element= s; the first element will be an element located in "firstNames" a= nd the second will be an element located in "lastNames."