From b97dee13083782009a20e18f532371bc135cc8ee Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Fri, 16 Oct 2026 12:33:29 +0100 Subject: [PATCH] site: v0.17.1 The download, the report and the library's PDFs, and the tour's Words, which finds from a place and tells a digit. --- diff --git a/site/public/_redirects b/site/public/_redirects index eb80dfb..9468464 100644 --- a/site/public/_redirects +++ b/site/public/_redirects @@ -1 +1 @@ -/download/latest /download/raz-0.17.0-linux-x86_64.tar.gz 302 +/download/latest /download/raz-0.17.1-linux-x86_64.tar.gz 302 diff --git a/site/public/advanced/listing.html b/site/public/advanced/listing.html index 87565fe..0d6986b 100644 --- a/site/public/advanced/listing.html +++ b/site/public/advanced/listing.html @@ -258,18 +258,18 @@
$ raz -o Dot Dot.raz
 $ objdump -d -M intel --no-show-raw-insn Dot | sed -n '/<Dot.dot>:/,/ret/p' | head -12
-0000000000403ae0 <Dot.dot>:
-  403ae0:	push   rbp
-  403ae1:	mov    rbp,rsp
-  403ae4:	sub    rsp,0x40
-  403aeb:	mov    QWORD PTR [rbp-0x38],rbx
-  403aef:	xor    ebx,ebx
-  403af1:	mov    QWORD PTR [rbp-0x30],r12
-  403af5:	xor    r12d,r12d
-  403af8:	mov    QWORD PTR [rbp-0x28],r13
-  403afc:	xor    r13d,r13d
-  403aff:	mov    QWORD PTR [rbp-0x20],rdx
-  403b03:	mov    QWORD PTR [rbp-0x18],rcx
+0000000000403bc0 <Dot.dot>: + 403bc0: push rbp + 403bc1: mov rbp,rsp + 403bc4: sub rsp,0x40 + 403bcb: mov QWORD PTR [rbp-0x38],rbx + 403bcf: xor ebx,ebx + 403bd1: mov QWORD PTR [rbp-0x30],r12 + 403bd5: xor r12d,r12d + 403bd8: mov QWORD PTR [rbp-0x28],r13 + 403bdc: xor r13d,r13d + 403bdf: mov QWORD PTR [rbp-0x20],rdx + 403be3: mov QWORD PTR [rbp-0x18],rcx

The listing is what the encoder meant; objdump is what the processor will read. They tell the same story.

Save a program under its module’s name and run it with raz run Name.raz.

← System callsContents
diff --git a/site/public/advanced/static.html b/site/public/advanced/static.html index 31d4fe5..c292548 100644 --- a/site/public/advanced/static.html +++ b/site/public/advanced/static.html @@ -65,7 +65,7 @@ $ ldd Bare not a dynamic executable $ ls -l Bare | awk '{print $5, "bytes"}' -26224 bytes +26728 bytes

It is statically linked: no interpreter, no shared libraries, no libc. ldd says so.

What it does when it runs

strace lists every system call a program makes. This is the whole of it:

@@ -134,14 +134,14 @@
$ raz Lean.raz
 $ raz Heavy.raz
 $ ls -l Lean Heavy | awk '{print $9, $5}'
-Heavy 28408
-Lean 28392
+Heavy 28904 +Lean 28896

The sizes differ by a few bytes, not by the hundreds of kilobytes that the table and the procedure would take: they are not in the executable at all. You can link in a library module without worrying what else it offers.

Stripping

-s leaves out what is there for finding faults: the symbols and line numbers, the places a failure is told by, and the profiler. It is for the final build of a size-conscious program; the default keeps them so that gdb and failure messages work.

$ raz -s -o Lean-stripped Lean.raz
 $ ls -l Lean Lean-stripped | awk '{print $9, $5}'
-Lean 28392
+Lean 28896
 Lean-stripped 6856
 $ ./Lean-stripped
 same program
diff --git a/site/public/download/raz-0.17.1-linux-x86_64.tar.gz b/site/public/download/raz-0.17.1-linux-x86_64.tar.gz new file mode 100644 index 0000000..88ed681 Binary files /dev/null and b/site/public/download/raz-0.17.1-linux-x86_64.tar.gz differ diff --git a/site/public/download/raz-0.17.1-linux-x86_64.tar.gz.sha256 b/site/public/download/raz-0.17.1-linux-x86_64.tar.gz.sha256 new file mode 100644 index 0000000..f042a6f --- /dev/null +++ b/site/public/download/raz-0.17.1-linux-x86_64.tar.gz.sha256 @@ -0,0 +1 @@ +49fb424ac3b7ee9ed29c87cd9fcb89ed314d2c17ca449077154aa293f2b9ff1c raz-0.17.1-linux-x86_64.tar.gz diff --git a/site/public/index.html b/site/public/index.html index 94d4262..b423100 100644 --- a/site/public/index.html +++ b/site/public/index.html @@ -113,24 +113,24 @@ the library.

Download

-

raz 0.17.0 is a tarball for x86-64 Linux with the compiler, raz, +

raz 0.17.1 is a tarball for x86-64 Linux with the compiler, raz, its library, lib/, which it finds beside itself, the formatter and the documentation tool as sources in tools/, and the manual pages. It needs nothing else installed.

- Download raz 0.17.0 - SHA-256 + Download raz 0.17.1 + SHA-256
-
$ tar xzf raz-0.17.0-linux-x86_64.tar.gz
-$ ln -s $PWD/raz-0.17.0-linux-x86_64/raz ~/.local/bin/raz
+
$ tar xzf raz-0.17.1-linux-x86_64.tar.gz
+$ ln -s $PWD/raz-0.17.1-linux-x86_64/raz ~/.local/bin/raz
 $ raz run Hello.raz

The link works since raz finds lib/ beside its real path. The manual pages are in man/: man ./man/raz-tutorial.7. The address download/latest always leads to the newest release, -and download/raz-0.17.0-linux-x86_64.tar.gz to this one, for -good. Earlier releases: 0.16.0, 0.15.0, 0.14.0, 0.13.0, 0.12.0, 0.11.1, 0.11.0, 0.10.1, 0.10.0, 0.9.1, 0.9.0, 0.8.0, 0.7.1; each has its SHA-256 beside it, with +and download/raz-0.17.1-linux-x86_64.tar.gz to this one, for +good. Earlier releases: 0.17.0, 0.16.0, 0.15.0, 0.14.0, 0.13.0, 0.12.0, 0.11.1, 0.11.0, 0.10.1, 0.10.0, 0.9.1, 0.9.0, 0.8.0, 0.7.1; each has its SHA-256 beside it, with .sha256 added to its name.

-

SHA-256 2425d173fb00eb6352a3a1c089469d038e00abae870816fd90d7a6fb707ae370

+

SHA-256 49fb424ac3b7ee9ed29c87cd9fcb89ed314d2c17ca449077154aa293f2b9ff1c

raz is under the ISC license.
diff --git a/site/public/raz-lib.pdf b/site/public/raz-lib.pdf index 4752f89..c23cc0e 100644 Binary files a/site/public/raz-lib.pdf and b/site/public/raz-lib.pdf differ diff --git a/site/public/raz.pdf b/site/public/raz.pdf index 26ef4eb..9d2dee1 100644 Binary files a/site/public/raz.pdf and b/site/public/raz.pdf differ diff --git a/site/public/spec.html b/site/public/spec.html index 3742943..c724c3c 100644 --- a/site/public/spec.html +++ b/site/public/spec.html @@ -78,7 +78,7 @@

writes "usage: tool [-v] file ...\n -v say what is done\n". Each line of an indented raw string must start with the closing line’s blanks, the same spaces and tabs in the same order, or it is an error; a line holding only blanks is an empty line of the text. A raw string that isn’t indented is the text between its backquotes as it stands.

A raw string can’t hold a backquote; a text that needs one joins it with +, as "`". Everywhere else a raw string is a string, as one in double quotes is.

Messages give the line and the column, counted in characters (section 10).

-

Comments are (* … *) and nest. By convention, the comment just before an exported declaration is its documentation, and the one before module is the module’s.

+

Comments are (* … *) and nest. A comment ends at the *) that closes it, wherever that stands, so one that quotes *), as in x*) of a pattern, writes it apart: x* ). By convention, the comment just before an exported declaration is its documentation, and the one before module is the module’s.

Operators and delimiters:

+  -  *  /  &  |  ~  =  #  <  <=  >  >=  :=  :  ;  ,  .  ..  ...  (  )  [  ]  {  }  ^

| is also what starts an arm of match (section 7.4); an arm comes where a statement could, never after an operand, so the two don’t mix.

@@ -869,7 +869,7 @@ Sys -system calls: open, openMode, openRead, create, read, write, seek, position, truncate, sync, syncAll, lock, close, dup, dupTo, dupAbove, keepOnExec, mmap, munmap, isTerminal, yield, exit; files and directories, rename, remove, removeDir, makeDir, chmod, access, umask, symlink, readLink, info, linkInfo, infoOf, openDir, nextEntry, entryKind, closeDir; the terminal, rawMode, restoreMode, getMode, setMode, termSize, ready; the environment, env, envAt, workDir, setWorkDir; programs, spawn and exec, pipes and signals; the user, the machine, time used and limits; time, clock, now, sleep; random; sockets, among them datagrams served and files passed; and memory shared through a file. One file per target, and Sys.raz over the C library for the others +system calls: open, openMode, openRead, create, read, write, seek, position, truncate, sync, syncAll, lock, close, dup, dupTo, dupAbove, keepOnExec, mmap, munmap, isTerminal, yield, exit; files and directories, rename, remove, removeDir, makeDir, chmod, access, umask, symlink, readLink, info, linkInfo, infoOf, openDir, nextEntry, entryKind, closeDir; the terminal, rawMode, restoreMode, getMode, setMode, termSize, ready; the environment, env, envAt, setEnv, workDir, setWorkDir; programs, spawn and exec, pipes and signals; the user, the machine, time used and limits; time, clock, now, sleep; random; what an errno means, errorText; sockets, among them datagrams served and files passed; and memory shared through a file. One file per target, and Sys.raz over the C library for the others Out @@ -913,7 +913,7 @@ Fmt -formatted output: Fmt.print("{} of {}\n", [Fmt.int(n), Fmt.real(x, 2)]), or into a Buf with Fmt.write +formatted output: Fmt.print("{} of {}\n", [Fmt.int(n), Fmt.real(x, 2)]), into a Buf with Fmt.write, or to standard error with Fmt.eprint List @@ -1115,8 +1115,11 @@ proc readyFor*(reads, writes: []INT; ms: INT): INT; (* readyOf, and the first of writes with room to write *) proc setBlocking*(fd: INT; yes: BOOL): INT; (* if not yes, a read or write that would wait is -11 at once *) +proc errorText*(err: INT): []U8; (* what errno err, or minus it, means, as C's strerror says *) + proc env*(name: []U8): []U8; (* the environment variable's value; "" if unset *) proc envAt*(i: INT): ([]U8, BOOL); (* the environment's ith NAME=value, from 0; false past the last *) +proc setEnv*(name, value: []U8): INT; (* name set to value, for env and the programs started *) proc workDir*: ([]U8, INT); (* the working directory, good until the next call *) proc setWorkDir*(path: []U8): INT; @@ -1175,7 +1178,7 @@

spawn starts the program at p.path, with p.args as its arguments, the first being its name. A p.path without a / is looked for as a shell looks for a command, and as C’s execvp does: in each directory of this program’s PATH in turn, an empty one being the working directory, or of /bin:/usr/bin if PATH is unset or empty; the first that runs is the program. Its environment is this program’s with each NAME=value of p.env added or put in place of the old value, or, if p.onlyEnv, p.env alone. It starts in p.dir. Its standard input, output and error are p.fds; a 0 gives it this program’s own, so {path: "ls", args: ["ls"]} runs ls as a shell runs it, with every other field zero. It gets no other open file but those of p.more, each at its own number, as a shell passes 3<file on, every signal does what it does at first, and none is blocked. If p.tty is a pseudo-terminal’s fd, the program starts a session on that terminal: it is its controlling terminal, and its standard input, output and error, and p.fds and p.group are not used.

p.group puts the program in a process group, the programs that a shell’s job is made of: -1 makes it the first of a new group, whose number is its process id, and the other programs of the job join that number. The terminal gives its keys, and the signals of Ctrl-C and Ctrl-Z, to one group, the one in its foreground: p.foreground puts the program’s group there before it starts, and foreground puts any group there, as a shell does to take the terminal back. setGroup moves a program to a group, as the shell does for each program it starts, for whichever of the two runs first; a shell runs in a group of its own, setGroup(0, 0).

exec runs the program p describes in this program’s place, as a shell’s exec cmd does, found and started as spawn would start it, p.tty, p.group, p.foreground, p.fds and p.dir included, except that it keeps this program’s other open files: each stays open in the program unless keepOnExec(fd, false) was said of it, as it is of pipe’s, and those of p.more are kept. It returns only if the program can’t run: -2 (ENOENT) or -13 (EACCES) if there is none to run, with nothing done; or, if the program is found but won’t start, minus the errno, with what p asks of the terminal, the group, the files and the directory done, and this program’s signals as they were.

-

A shell moves its own files with dup and dupTo, for 2>&1 and exec >log and around a builtin: dupTo(fd, into) makes into the same open file as fd, closing what into was, and dup gives a new fd for it, the lowest free, as a shell saves a file to give it back. dupAbove(fd, 10) gives one at 10 or above, closed on exec, out of the way of the fds a script names (3>log), as a shell keeps its own. fork copies this program, which goes on from there in both: it is 0 in the copy and the copy’s process id in this one, as a shell runs a builtin or a procedure as a stage of a pipe. Only the thread that calls it is copied, so a program with threads mustn’t; and what Out keeps is copied too, to be written twice, so Out.flush comes first. group is the process group this program is in: a shell starting on a terminal waits until it is foregroundOf(0) before it takes it. access says whether this user, by its real ids, may read, write or execute a file, as test -r, -w and -x ask, which Info.mode alone can’t say; an empty how asks only whether it is there. open refuses executing, with -22 (EINVAL). umask sets the bits taken away from the mode of every file this program, and those it starts, make, and says what they were. envAt gives the environment one variable at a time, from 0, for a shell to list it and to pass it on whole with onlyEnv. getMode reads a terminal’s modes, and setMode sets them again once what was written is sent, so that a shell keeps them for each job: a program stopped by Ctrl-Z with its terminal raw gets it back raw, and the shell its own between. cpuTime says how long the processor ran this program, in its own code and in the system for it, or, if children, the programs it started and has waited for, as time and times say. limit gives a limit, limitFiles say, soft and hard, and setLimit sets them, as ulimit does: a program may raise its soft limit up to the hard one, and lower either. uid is the user this program runs as, euid the one whose rights it has, 0 for root, as a prompt shows #; hostName is the machine’s name.

+

A shell moves its own files with dup and dupTo, for 2>&1 and exec >log and around a builtin: dupTo(fd, into) makes into the same open file as fd, closing what into was, and dup gives a new fd for it, the lowest free, as a shell saves a file to give it back. dupAbove(fd, 10) gives one at 10 or above, closed on exec, out of the way of the fds a script names (3>log), as a shell keeps its own. fork copies this program, which goes on from there in both: it is 0 in the copy and the copy’s process id in this one, as a shell runs a builtin or a procedure as a stage of a pipe. Only the thread that calls it is copied, so a program with threads mustn’t; and what Out keeps is copied too, to be written twice, so Out.flush comes first. group is the process group this program is in: a shell starting on a terminal waits until it is foregroundOf(0) before it takes it. access says whether this user, by its real ids, may read, write or execute a file, as test -r, -w and -x ask, which Info.mode alone can’t say; an empty how asks only whether it is there. open refuses executing, with -22 (EINVAL). umask sets the bits taken away from the mode of every file this program, and those it starts, make, and says what they were. envAt gives the environment one variable at a time, from 0, for a shell to list it and to pass it on whole with onlyEnv. setEnv refuses a name that is empty or holds an =, and a 0 in either, with -22; as C’s setenv, it isn’t safe while another thread reads the environment, and what env gave for a variable may be gone once it sets that variable again. getMode reads a terminal’s modes, and setMode sets them again once what was written is sent, so that a shell keeps them for each job: a program stopped by Ctrl-Z with its terminal raw gets it back raw, and the shell its own between. cpuTime says how long the processor ran this program, in its own code and in the system for it, or, if children, the programs it started and has waited for, as time and times say. limit gives a limit, limitFiles say, soft and hard, and setLimit sets them, as ulimit does: a program may raise its soft limit up to the hard one, and lower either. uid is the user this program runs as, euid the one whose rights it has, 0 for root, as a prompt shows #; hostName is the machine’s name.

wait waits for the program pid to change, for any of this program’s if pid is -1, or for any of the group g if pid is -g, as a shell waits for a job’s programs, and says which one, and how: exited, with its exit status; killed, with the number of the signal that ended it; or stopped, by Ctrl-Z or a signal, with the signal’s number. Without block it doesn’t wait, and is 0 and running if no program changed. A program that has nothing to wait for is -10 (ECHILD). kill sends a program a signal, sigTerm to end it; to a group, if pid is minus its number.

Signals. catch takes the signals sigs away from what they would do, ending the program most of them, and gives an fd that is ready to read when one comes, so that a program waits for signals with ready and readyOf as it waits for keys or a server. caught gives each signal that came, in turn. A later catch adds to the signals caught and gives the same fd. Catching sigKill or sigStop, or the signals Rt reports, SIGSEGV and SIGFPE, is -22 (EINVAL). ignore makes a signal do nothing, as a shell ignores sigTtou so that it can take its terminal back, and ignore(sig, false) gives it back what it does at first. A program that spawn starts begins with neither.

handle is for a program that must see a signal while it waits in a system call, as a shell waiting for its foreground program, or for a key, sees Ctrl-C: the signal is noted, and the call it comes during, wait, read, ready and the rest, fails with -4 (EINTR) rather than going on; sleep sleeps its time all the same. came(sig) says whether it came since the last time it was asked. Nothing else runs when the signal comes, so the program does what it does after it, in its own time; Out and Files try again after -4. ignore(sig, false) gives the signal back what it does at first, and the signals catch refuses, handle refuses too.

@@ -1194,6 +1197,7 @@ proc free*(a: ^Mem.Allocator; s: []U8); (* what copy gave from a, given back; "" is none *) proc hash*(s: []U8): U64; (* FNV-1a, 64 bits *) proc find*(s, sub: []U8): INT; (* where sub first starts in s, or -1 *) +proc findFrom*(s, sub: []U8; from: INT): INT; (* where sub first starts in s at or after from, or -1 *) proc findLast*(s, sub: []U8): INT; (* where sub last starts in s, or -1 *) proc hasPrefix*(s, p: []U8): BOOL; proc hasSuffix*(s, x: []U8): BOOL; @@ -1202,6 +1206,11 @@ proc trimRight*(s: []U8): []U8; (* s without the spaces at its end *) proc cut*(s, sep: []U8): ([]U8, []U8, BOOL); (* what comes before the first sep, and after it *) proc field*(s: []U8): ([]U8, []U8); (* the first run of bytes in s that aren't spaces, and what follows it *) +proc isDigit*(c: U8): BOOL; (* 0 to 9 *) +proc isLetter*(c: U8): BOOL; (* A to Z, a to z *) +proc isSpace*(c: U8): BOOL; (* a space, as trim takes it *) +proc isPunct*(c: U8): BOOL; (* printable, and neither a letter, a digit nor the blank *) +proc hexVal*(c: U8): INT; (* c's value as a hexadecimal digit, or -1 *) proc lower*(s: []U8); (* s's ASCII capitals made small, in place *) proc upper*(s: []U8); (* s's ASCII small letters made capitals, in place *) proc join*(b: ^Buf.Buf; parts: [][]U8; sep: []U8); (* the parts added to b, sep between each two *) @@ -1242,6 +1251,7 @@ real(r: F64; places: INT); end; proc print*(f: []U8; args: []Arg); (* to standard output *) +proc eprint*(f: []U8; args: []Arg); (* to standard error, once Out is flushed *) proc write*(b: ^Buf.Buf; f: []U8; args: []Arg); (* added to b *) module List(T); @@ -1269,6 +1279,8 @@ proc room*(v: ^Vec; n: INT): BOOL; (* room for n more; false if the allocator has none *) proc push*(v: ^Vec; x: T); (* x added at the end *) proc add*(v: ^Vec): ^T; (* a new element at the end, zero, to fill in place *) +proc tryPush*(v: ^Vec; x: T): BOOL; (* push; false, and v as it was, if there is no room *) +proc tryAdd*(v: ^Vec): (^T, BOOL); (* add; nil and false, and v as it was, if there is no room *) proc resize*(v: ^Vec; n: INT); (* n elements: cut short, or the new ones zero *) proc all*(v: ^Vec): []T; (* the elements, until it next grows *) proc reset*(v: ^Vec); (* emptied, its memory kept *) @@ -1306,8 +1318,8 @@ ... (* c is a character of s *) c, i := Str.next(s, i); end;
-

A string is bytes, and Str takes no more of Unicode than UTF-8: lower, upper and eqFold change and match ASCII letters alone, and nothing says how wide a character is on a terminal, nor which spellings of a text are the same.

-

A space, to trim, trimLeft, trimRight and field, is a blank, a tab, a line feed, a carriage return, a vertical tab or a form feed. cut gives what comes before the first sep in s, what comes after it, and true; or s, an empty string and false if s has no sep. field passes the spaces at the start of s and gives the bytes up to the next space or the end, and the rest of s from there; two empty strings if s holds only spaces. They take a string apart without memory of their own, each part a slice of s:

+

A string is bytes, and Str takes no more of Unicode than UTF-8: lower, upper and eqFold change and match ASCII letters alone, the character tests know ASCII alone, and nothing says how wide a character is on a terminal, nor which spellings of a text are the same.

+

A space, to isSpace, trim, trimLeft, trimRight and field, is a blank, a tab, a line feed, a carriage return, a vertical tab or a form feed. cut gives what comes before the first sep in s, what comes after it, and true; or s, an empty string and false if s has no sep. field passes the spaces at the start of s and gives the bytes up to the next space or the end, and the rest of s from there; two empty strings if s holds only spaces. They take a string apart without memory of their own, each part a slice of s:

line, rest, more := Str.cut(text, "\n");     (* the first line, and the others *)
 key, val, ok := Str.cut(line, "=");
 w, rest := Str.field(line);                 (* the words of a line *)
diff --git a/site/public/tour/hello.html b/site/public/tour/hello.html
index 0a1dc8d..002f685 100644
--- a/site/public/tour/hello.html
+++ b/site/public/tour/hello.html
@@ -70,7 +70,7 @@
 $ raz run Quiet.raz
 hello, again
 $ ls -l Quiet | awk '{print $5, "bytes"}'
-28400 bytes
+28904 bytes

The program is a static executable with no run time besides the code it uses, so it is a few kilobytes, and runs without any library installed.

What Out can write

Out is the library's buffered output. It writes strings, single characters, numbers in decimal or hexadecimal, and a line feed. A string is written as it is, with \n for a line feed, \t for a tab, \" and \\; or between backquotes, as a raw string with no escapes at all, which may run over lines (lesson 6).

diff --git a/site/public/tour/slices.html b/site/public/tour/slices.html index 649fca7..8d17bd6 100644 --- a/site/public/tour/slices.html +++ b/site/public/tour/slices.html @@ -162,7 +162,7 @@
1 1 2 3 4 5 
 

Strings

-

A string is a slice of bytes, []U8, in UTF-8, and a string constant's bytes are constant. A [8]U8 made from one is a copy you can change. Arrays and slices of integers compare with = and #, so strings do too. Str has the rest: ordering, finding, hashing, prefixes and suffixes, trimming, taking apart, ASCII case, UTF-8, and numbers to and from text.

+

A string is a slice of bytes, []U8, in UTF-8, and a string constant's bytes are constant. A [8]U8 made from one is a copy you can change. Arrays and slices of integers compare with = and #, so strings do too. Str has the rest: ordering, finding, hashing, prefixes and suffixes, trimming, taking apart, ASCII case and kinds of character, UTF-8, and numbers to and from text.

Words.raz
module Words;
 import Out, Str;
 
@@ -175,6 +175,8 @@
     Out.int(Str.find(s, "world")); Out.ln;          (* 7 *)
     Out.int(Str.find(s, "xyz")); Out.ln;            (* -1 *)
     Out.int(Str.findLast("abcabc", "bc")); Out.ln;  (* 4 *)
+    Out.int(Str.findFrom(s, "o", 5)); Out.ln;       (* 8: the first o from 5 on *)
+    if Str.isDigit('7') and not Str.isLetter('7') then Out.str("a digit\n"); end;
     if Str.hasPrefix(s, "hell") then Out.str("prefix\n"); end;
     if Str.hasSuffix(s, "world") then Out.str("suffix\n"); end;
     Out.int(Str.cmp("apple", "banana")); Out.ln;    (* -1 *)
@@ -199,6 +201,8 @@
 7
 -1
 4
+8
+a digit
 prefix
 suffix
 -1