[previous] [up] [next]     [contents] [index]
Next: Initial Basis Up: Language Reference Previous: Language Levels

Configuring your language

Choosing Language tex2html_wrap_inline6218 Configure Language... opens a window with a choice dialog item. The choice permits you to choose a language level. The dialog also contains a Show Details button. Clicking on this button, or choosing the Custom language opens a new bottom portion of the dialog.

The top and bottom portions of the dialog are always synchronized with each other. For example, if you select Beginner from the Language choice, the items in the bottom portion change to reflect the specifics of the language Beginner. Conversely, if you are working in the language Beginner and change the Output Syntax choice, the Language choice changes to Custom to show that the current language matches none of the pre-defined languages.

The description of a language level consist of three parts: input syntax, safety properties, and output syntax. The input syntax is specified through the Case sensitive check box, and a vocabulary, a set of syntactic forms. The four pre-defined vocabularies are: Beginner, Intermediate, Advanced, R tex2html_wrap_inline6220 RS+ and MrEd.

The first three rows of the table in figure [cross-reference] specify the exact syntactic content of the various language levels, except for the MrEd vocabulary. The MrEd vocabulary matches MrEd, as described in the PLT MrEd: Graphical Toolbox: manual.

The safety properties of DrScheme allow you to choose between conformance with R tex2html_wrap_inline6220 RS and more sensible error reporting. They can be specified with these check boxes:

When the Allow improper lists is unchecked, cons can only be used to construct lists; its second argument must always be either null or the result of an application of cons. The Allow set! on undefined identifiers check box controls whether set! creates a new name at the top-level or signals an error for unbound identifiers. If Unmatched cond/case is an error is on, the implicit else clause in cond and case expressions signal a run-time error, and if it is off, the implicit else clauses return a void value. The Signal undefined variables when first referenced checkbox determines when undefined variable references are signaled as an error. If the checkbox is on, undefined variables are signaled as early as possible, but at a significant runtime cost. If Conditionals must evaluate to either #t or #f is set, then the question position of each cond clause must evaluate to a boolean. If not, the question position can evaluate to any scheme value, where #f is treated as false, and all other values are true. When Eq? only compares symbols is checked, eq? will signal an error unless its arguments are both symbols.

The output syntax is determined by the Show sharing in values check box, the Abbreviate multipls cons's with list check box, the Print inexacts with #i check box, the Print rationals in whole/part notation check box, and the Printing choice. When Show sharing in values is on, all sharing within data structures is displayed in the output. When Abbreviate multiple cons's with list is on, mutiple cons that have a null in the final cdr (or rest) position will print using list. When Print inexact numbers with #i is on, inexact numbers are always printed with a leading #i. When Print rationals in whole/part notation is on, rationals number larger than one will print as a sum of the whole number part and the fractional part. For example, the number 3/2 will print as (+ 1 1/2). The Printing choice provides four alternatives: Constructor, Quasiquote (lists only), Quasiquote (read syntax) or R tex2html_wrap_inline6220 RS style. Constructor style output means that the list containing the numbers 1, 2, and 3 prints out as (list 1 2 3). Because it mirrors input syntax, constructor style output is useful for general programs and mandatory for pedagogic programming. In contrast, quasiquote style is a compromise between the constructor style output and the standard Scheme output style. Like the former, the quasiquote-style printer outputs answers that match the Lisp-style input syntax. But, its outputs can also be used as programs, just like those of the standard Scheme printer.


[previous] [up] [next]     [contents] [index]
Next: Initial Basis Up: Language Reference Previous: Language Levels

PLT