Some Sample CodeThis document is intended to give SamR a bit of a chance to
experiment with the ways in which we might write code using DocBook.Scheme CodeHere, we just have a sample bit of Scheme code, entered directly
within the DocBook file.
;;; Procedure:
;;; square
;;; Parameters:
;;; x, a number
;;; Purpose:
;;; Computes the square of x
;;; Produces:
;;; x-squared, a number
;;; Preconditions:
;;; [No additional.]
;;; Postconditions:
;;; x-squared should have the same "type" as x. For example,
;;; if x is an integer, x squared is also an integer;
;;; if x is exact, x squared is also exact.
;;; x-squared = x * x
(define square
(lambda (x)
(* xx)))
Inserted CodeTo get this to compile correctly, we need to add the
--xinclude
flag to xsltproc.Sample Interaction>(square 4)16>(square "hello")Error: *: First parameter is not a number.>(read)Hello world!Hello world!>>(print "Hello world!")#tHello world!Fun with entities
[&title-prefix;]
A Full Procedure Head(foobarbaz)Fun with Links
Don't you just love association
lists?
Don't you wnat to return to the beginning?
HTML Tables