Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
You can edit this page using
wiki syntax
for markup.
Article contents:
[[tags: manual]] [[toc:]] == Extensions to the R7RS standard === Brackets and braces The brackets {{[ ... ]}} and the braces {{ { ... } }} are provided as an alternative syntax for {{( ... )}}. A number of reader extensions is provided. === User defined character names User defined character names are supported. See {{char-name}}. Numeric hexadecimal character codes above are supported and can be read using ''#\uXXXX'' and ''#\UXXXXXXXX'', in addition to the standard ''\x...;'' notation. Non-standard characters names supported are {{#\linefeed}}, {{#\vtab}}, {{#\nul}}, {{#\page}} and {{#\esc}}. == Non-standard read syntax === Multiline Block Comment <read>#|</read> #| ... |# A multiline ''block'' comment. May be nested. Implements [[http://srfi.schemers.org/srfi-30/srfi-30.html|SRFI-30]]. === Expression Comment <read>#;</read> #;EXPRESSION Treats {{EXPRESSION}} as a comment. That is, the comment runs through the whole S-expression, regardless of newlines, which saves you from having to comment out every line, or add a newline in the middle of your parens to make the commenting of the last line work, or other things like that. Implements [[http://srfi.schemers.org/srfi-62/srfi-62.html|SRFI-62]]. === External Representation <read>#,</read> #,(CONSTRUCTORNAME DATUM ...) Allows user-defined extension of external representations. (For more information see the documentation for [[http://srfi.schemers.org/srfi-10/srfi-10.html|SRFI-10]]) === Location Expression <read> #$EXPRESSION</read> An abbreviation for {{(location EXPRESSION)}}. === Bytevector strings <read>#u8"..."</read> String syntax for bytevectors, as an alternative to {{#u8(...)}}. The usual escape sequences for strings are recognized. Note that this syntax is also available for other numeric vectors, like "s8", "u16", "f32", etc. In each case the elements will be the codepoint values of the strings' characters. <read>#u8{HEX...}</read> Hexadecimal bytevector syntax. {{HEX...}} should be an even number of hexadecimal characters representing the contents of the vector. #u8{deadbeef} == #u8(#xde #xad #xbe #xef} === Keyword <read>#:</read> #:SYMBOL SYMBOL: :SYMBOL Syntax for keywords. Keywords are symbol-like objects that evaluate to themselves, and as such don't have to be quoted. Either {{SYMBOL:}} or {{:SYMBOL}} is accepted, depending on the setting of the {{keyword-style}} parameter, but never both. {{#:SYMBOL}} is always accepted. === Multiline String Constant <read>#<<</read> #<<TAG Specifies a multiline string constant. Anything up to a line equal to {{TAG}} (or end of file) will be returned as a single string: (define msg #<<END "Hello, world!", she said. END ) is equivalent to (define msg "\"Hello, world!\", she said.") === Multiline String Constant with Embedded Expressions <read>#<#</read> #<#TAG Similar to {{#<<}}, but allows substitution of embedded Scheme expressions prefixed with {{#}} and optionally enclosed in curly brackets. Two consecutive {{#}}s are translated to a single {{#}}: (define three 3) (display #<#EOF This is a simple string with an embedded `##' character and substituted expressions: (+ three 99) ==> #(+ three 99) (three is "#{three}") EOF ) prints This is a simple string with an embedded `#' character and substituted expressions: (+ three 99) ==> 102 (three is "3") === Foreign Declare <read>#></read> #> ... <# Abbreviation for {{(foreign-declare " ... ")}}. === String escape sequences String-literals may contain the following escape sequences: <table style="margin-top: 1em; max-width: 40em"> <tr><th>Escape sequence</th><th>Character</th></tr> <tr><td>{{\n}}</td><td>line feed / newline</td></tr> <tr><td>{{\t}}</td><td>tab</td></tr> <tr><td>{{\r}}</td><td>carriage return</td></tr> <tr><td>{{\b}}</td><td>backspace</td></tr> <tr><td>{{\a}}</td><td>bell</td></tr> <tr><td>{{\v}}</td><td>vertical tab</td></tr> <tr><td>{{\f}}</td><td>form feed</td></tr> <tr><td>{{\x}}''XX;''</td><td>hexadecimal 8-bit character code</td></tr> <tr><td>{{\u}}''XXXX''</td><td>hexadecimal 16-bit Unicode character code</td></tr> <tr><td>{{\U}}''XXXXXXXX''</td><td>hexadecimal 32-bit Unicode character code</td></tr> <tr><td>{{\}}''OOO''</td><td>octal 8-bit character code</td></tr> <tr><td>{{\|}} {{\"}} {{\\}} {{\'}}</td><td>the escaped character</td></tr> </table> === Bang <read>#!</read> #!... Interpretation depends on the directly following characters. Only the following are recognized. Any other case results in a read error. ; Line Comment : If followed by whitespace or a slash, then everything up the end of the current line is ignored ; Eof Object : If followed by the character sequence {{eof}}, then the (self-evaluating) end-of-file object is returned ; DSSSL Formal Parameter List Annotation : If followed by any of the character sequences {{optional}}, {{rest}} or {{key}}, then a symbol with the same name (and prefixed with {{#!}}) is returned ; Read Mark Invocation : If a ''read mark'' with the same name as the token is registered, then its procedure is called and the result of the read-mark procedure will be returned (see {{set-read-syntax!}}). === Conditional Expansion <read>#+</read> #+FEATURE EXPR Rewrites to (cond-expand (FEATURE EXPR) (else)) and performs the feature test at macroexpansion time. Therefore, it may not work as expected when used within a macro form. --- Previous: [[Deviations from the standard]] Next: [[Interface to external functions and variables]]
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you subtract 7 from 8?