Trial with simple functions:
---------------------------
f is
let f x = "My argument was $(x)";;
t is
let t = "named t";;
y is
let y = "$(f t)";;
# Applying f to t (which is bound to ``named t'') leads to
# ``My argument was named t''.
let concat x y = "$(x)$(y)";;
let z = $t;;
let u = $(concat "con" "catenation");;
Applying concat to "con" and "catenation" gives
# `` concatenation ''.
---------------------------
Trial with the htmlc function title: we evaluate
$(title "Function application")
---------------------------
Function application
---------------------------
Trial with function expand: we evaluate
$(expand $(title "Function application"))
---------------------------
Function application
---------------------------
Leftering stuff.
---------------------------
This is the end_______________________________________________________________
---------------------------
Centering stuff.
---------------------------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@This is the end@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
---------------------------
Rightering stuff.
---------------------------
This is the end
---------------------------
Putting stuff in upper case characters.
---------------------------
YOU HAVE BEEN WARNED!
---------------------------
Putting stuff in lower case characters.
---------------------------
latex
---------------------------
Capitalizing stuff.
---------------------------
Paris
---------------------------
Creating a string.
---------------------------
Haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
---------------------------
Computing the length of the previous line.
---------------------------
Haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
The previous line is 46 characters long.
---------------------------
A blank string between two sharp-signs.
---------------------------
# #
---------------------------
Computing the release ident.
---------------------------
My_soft 1.0
Htmlc 1.80
OCaml 3.09
LaTeX 3.14
---------------------------
Computing the distribution ident.
---------------------------
Htmlc 1.80+dev12
OCaml 3.09+pl4
LaTeX 3.14+rc159
My_soft 0.0+alpha42
Your_soft 0.0+beta0
---------------------------
Computing the version full info.
---------------------------
LaTeX 3.14+rc159 (2007-08-09, by a gibbous moon)
My_soft 0.0+alpha42 (2005-06-07, reimplemented from scratch)
---------------------------
Computing arithmetic operations.
---------------------------
(42 - 2) + 2 = 42.
(42 + 2) - 2 = 42.
(42 / 2) * 2 = 42.
(42 * 2) / 2 = 42.
(sqrt 42) ** 2 = 42.
sqrt(42 ** 2) = 42.
sqrt(3 ** 2 + 4 ** 2) = 5.
---------------------------
Computing arithmetic operations with 2-decimal results.
---------------------------
sqrt(1+1) is almost 1.41.
1/3 is almost 0.33
then 3 * (1/3) is almost 0.99,
but 3 * (1/3) is exactly 1.00.
---------------------------
Computing arithmetic operations with 0-decimal results.
---------------------------
sqrt(1+1) is almost 1.
1/3 is almost 0
then 3 * (1/3) is almost 0.,
but 3 * (1/3) is exactly 1.
---------------------------
Conditionals
---------------------------
Quand Pifou content, Pifou faire
"glop glop";
mais quand Pifou pas content, Pifou faire
"pas glop pas glop".
Quand Pifou content, Pifou faire "glop glop";
mais quand Pifou pas content, Pifou faire "pas glop pas glop".
The empty string is empty: true!
The empty string is not empty: false.
With an empty URL string, we simply display the text:
text,
but with a nonempty URL string, we display the corresponding link:
text.
With an empty URL string, we simply display the text:
text,
but with a nonempty URL string, we display the corresponding link:
text.
---------------------------