Message-ID: <1761589029.41326.1371648092019.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_41325_1840293989.1371648092018" ------=_Part_41325_1840293989.1371648092018 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Boo has an interactive interpreter that is useful for testing ou= t snippets of boo code.
To use it, run the booish.exe command line tool. You can also edit, comp= ile, and debug if you install the Boo AddIn For SharpDevelop.
Type describe(obj), where obj is the name of some object, and the interp= reter will list the methods and other members of that object.
load(assemblypath) is useful for adding a reference to a dll for later c= ode.
To load an assembly by name instead of file path, use the extended Import syntax, i.e. "import System.Wind= ows.Forms from System.Windows.Forms".
You can reference the interpreter object itself as "interpreter&quo= t;. For example, you can turn default Duck Typing off by typing "interpreter.Ducky =3D false"
Prints out all the objects that the interpreter has stored in your sessi= on.
The symbol "_" (underscore) refers to the last value returned = by the interpreter. For example:
Similar to describe, dir spits out an array of all the type members cont= ained by an object.
Just type the line beginning the code block (like "def mymethod():&= quot; or "class MyClass:", then return and you'll be able to inde= nt the following lines just like in a regular boo script. Hit return twice= to end the indented block.
Hit the up arrow key to see previous lines you have typed in. Edit the l= ine and hit Enter to resubmit it.
The sharpdevelop version of booish hooks into SharpDevelop's code comple= tion engine.
Implicit Duck Typing is on by d= efault. Useful for quicker coding, i.e., this code will run fine in the in= terpreter: (no need to declare "p as string")
See the source code under src/booish/ for how the interpreter is run.
You can override the Lookup, Declare, GetValue and SetValue methods in A= bstractInterpreter to do things like intercepting name resolution or adding= outside scopes to the interpreter. This can be useful for example when em= bedding the interpreter in a C# or boo app.
Here is a sample of using an outside object for the name resolution, by = Rodrigo B. de Oliveira:------=_Part_41325_1840293989.1371648092018--