Annex B Diagnostics (informative)
(1) This annex collects the messages of the diagnostics tables of the clauses. They are the texts this implementation prints (4 (3)). The left column is the clause that lists the message.
(2) A refusal is printed as file:line:column: message. The line and column are those of the token at which the processor knew: something missing is known at the token after it, a value left over at the end of the definition. In a message, name, s, i and buf stand for places, not words, and the short code after a colon shows the right form.
| Clause | Message |
|---|---|
| 6 | this character is not allowed outside literals and remarks |
| 6 | a dot is followed by a name, with no space |
| 6 | a number must not run into letters, an underscore or a dot |
| 6 | a sign is attached to its number; arithmetic uses words (add, sub) |
| 6 | the integer does not fit in 64 bits |
| 6 | a decimal has at most 18 digits after the point |
| 6 | the decimal does not fit in 64 bits at its scale |
| 6 | an underscore stands between two digits |
| 6 | the string is not closed on its line |
| 6 | unknown escape; a raw string r"..." keeps backslashes as written |
| 6 | the escape is not a code point |
| 6 | the only prefix of a string is r (raw string) |
| 6 | a character literal holds one character |
| 6 | this source is written for another format version; this build reads version 2 |
| 7 | a bool is expected here |
| 7 | this word takes two values of one type: u8 with u8, int with int; u8 and raw convert |
| 7 | the constant is outside the range of this type; low_u8 and the others keep the low bits |
| 7 | u8, u16, u32, u64, i8, i16, i32 and low_u8 ... are made from an int or from one another; for a declared type take raw first |
| 7 | u_shr takes an int or an unsigned type; a signed type shifts with shr |
| 7 | u_div, u_mod, floor_div and floor_mod take an int or an unsigned type |
| 7 | u_lt, u_le, u_gt and u_ge take an int or an unsigned type; a signed type compares with lt |
| 7 | rotl and rotr take an int or a u64; for a narrow type take raw |
| 7 | mul_hi and u_mul_hi take an int or a u64; for a narrow type take raw |
| 7 | abs takes an int or a declared type over int; a narrow type has no abs |
| 7 | this word takes two int values, or two of the same declared type |
| 7 | a declared type is added to and subtracted from its own type, and multiplied, divided or taken modulo by an int; for other arithmetic take raw |
| 7 | an argument has another type than the word's signature asks for |
| 7 | stored text is str(N); a str view lives only in locals, arguments and results |
| 7 | a field holds str(N); a str view lives only in locals, arguments and results |
| 7 | two dec values of different scales: rescale one first (d 2 rescale) |
| 7 | a dec is divided by an int, not by a dec; for a share, rescale first and divide by the int |
| 7 | dec(A) times dec(B) is dec(A+B), and A+B is at most 18; rescale one first |
| 7 | dec(N) has 0 to 18 digits after the point |
| 7 | fits names a place of type str(N): record.field, a global, or an array or a list |
| 7 | fits names a place a store keeps; a local holds a text of any length |
| 7 | fits names a declared global, array or list; there is none of this name |
| 7 | fits takes a text: text fits place |
| 7 | fits is followed by a place: text fits record.field, or the name of a global |
| 8 | this list's rows are kept by a field, a global, a collection, a named row or an index; it cannot be truncated |
| 8 | a pool is walked by each only |
| 8 | an index belongs to a declared array, list or pool of records |
| 8 | an index over a pool is not shared, as a pool is not |
| 8 | has takes a key and the name of an index: key by_name has |
| 8 | this name is already defined |
| 8 | this name is not declared before this place |
| 8 | the host gave no capacity for NAME (pinax_capacity) |
| 8 | outside a definition `to` makes no new local; a global is written with set |
| 8 | assign has more values than the array has cells |
| 8 | a queue holds int, bool, err or dec(N) values |
| 8 | push can fail and lose an owned row; store it with set, into a field or into a global |
| 8 | a value has another type than its field |
| 8 | an owned value in a local is not given on every path (close, free or store it) |
| 8 | a table announced by forward is never declared |
| 8 | a shared global is read-only: nothing here may change it |
| 8 | a shared collection is read-only: the word it is given to changes this parameter |
| 8 | a shared collection is read-only: it is not given to the word a block value names, which may change it |
| 8 | redefine cannot make the word change a collection parameter the old one only read: shared collections may have been given to it |
| 8 | a shared buffer is read-only: it is not given to a host word, which may write it |
| 8 | shared stands before global, array, list, buffer or index |
| 8 | err is followed by the name of a new failure code |
| 8 | the name of a failure code is at most 31 bytes long |
| 9 | inputs are all named or all bare types, not a mix |
| 9 | the stack does not hold exactly the results of the signature here |
| 9 | the stack does not hold enough values for this word |
| 9 | values are left on the stack at the end of the source |
| 9 | this local variable has another type than the value stored into it |
| 9 | this name is a global; a global is written with set: value set name |
| 9 | a global of a module is written with set: value set module.name |
| 9 | set writes a global; a local is written with to |
| 9 | set writes a declared global; there is none of this name |
| 9 | this name is already visible here; a new name may not hide it |
| 9 | NAME is a word of the language; choose another name |
| 9 | the definition has another signature than its forward declaration |
| 9 | the collection given here is of another kind, or holds another type, than the parameter says |
| 9 | this parameter takes an array, list, queue or buffer: give its name |
| 9 | a word gives no collection; it takes one as a parameter |
| 9 | this is a collection parameter; a cell of it is stored as: value index set name |
| 9 | this list's rows are kept by a field, a global, a collection, a named row or an index; the word it is given to truncates it |
| 9 | filter_into does not copy rows between two tables parameters name; walk one and add_row |
| 10 | the two branches of this if leave different stacks |
| 10 | one turn of a loop must leave the stack as it found it |
| 10 | while, until and break belong inside a loop |
| 10 | only the block of each, each_index or times is left early; this word gives a result made from every element |
| 10 | a named loop outside this block is not left from inside it; break leaves the block |
| 10 | this code cannot be reached: the code before it always leaves |
| 10 | this value is already in an earlier branch of the case |
| 10 | this block must leave the stack as it found it |
| 10 | return belongs inside a definition |
| 10 | a case value is a literal or the name of a const |
| 10 | only an array, a list or a pool is a stem (not a queue, a buffer or an index) |
| 10 | defer is written right in a word's body, a loop's body or a do block, not in a branch |
| 10 | defer belongs inside a definition |
| 10 | a defer leaves the stack as it found it |
| 10 | a defer holds no return, fail, break, while, until, to, set, loop, do, case or defer |
| 10 | a defer does not leave the word; a failure in it is taken with or_else |
| 10 | a defer gives this owned value when the block is left; here it can only be lent |
| 10 | a block without a signature takes nothing; a word of the program is given as do NAME end, any other word with the block's signature: do (str, str gives bool) str.starts_with end |
| 10 | a word declared with forward is given as a value only after its definition |
| 11 | a word that can fail is followed by or_fail, or_return or or_else |
| 11 | or_fail passes the failure on, so this word needs `or fail` in its signature |
| 11 | fail needs `or fail` in the signature of this word |
| 11 | the body of or_else must leave what the word would have given, or leave the word or the loop |
| 12 | a str made after this mark is still on the stack; the release gives its bytes back |
| 12 | this str was made after a mark that was released since; the region may hold other bytes there now |
| 12 | this local gave its owned value away; it holds nothing to read |
| 12 | an owned value is kept in a local or given on at once; this word would lose it |
| 13 | no module of this name is registered or loaded |
| 13 | this path names neither a module in use nor a record |
| 13 | the module exports nothing of this name |
| 13 | a data source defines no words and uses no modules |
| 13 | a data source calls no words; only literals, const names and stores |
| 13 | search stands at the top level, outside definitions and blocks |
| 13 | search is followed by modules in parentheses: search (io, str) |
| 13 | this module is named twice in the search order |
| 13 | a search order names at most 16 modules |
| 14 | spawn takes a block that takes and gives nothing, and a set of tasks: do ... end workers spawn |
| 14 | this word takes a task |
| 14 | run_all takes a set of tasks |
| 14 | a set holds at most 4096 tasks |
| 14 | the call depth of a task is 1 to 4096 |
| 14 | the region of a task is at most 16 MiB |
| 14 | a data source runs no code and declares no tasks |
| 14 | task_tag takes an int |
| 14 | the turn limit of a task is at least 1 |
| 15 | this word takes two int values |
| 15 | the two values compared must have the same type |
| 15 | select takes a bool and two values of one type: flag a b select |
| 15 | rows do not move: sort a list of their numbers by a field: order table sort_by record.field |
| 15 | sort orders cells of int, a narrow integer, dec(N), bool or str(N) |
| 15 | sort_by takes a list of rows or row numbers and a table of records: order table sort_by record.field |
| 15 | the cells are rows of another table than the one sort_by names |
| 15 | sort_by is followed by the field: order table sort_by record.field |
| 15 | the field is one of the record the table holds |
| 15 | sort_by orders by a field of int, a narrow integer, dec(N), bool or str(N) |
| 15 | sort_by takes the list or the table from a parameter, not both |
| 16 | this word takes an int |
| 16 | this word takes a str and a buffer, as: s buf encode.base64_encode |
| 16 | a pattern is a string literal or a const name, so that it is checked at load |
| 16 | a set is not closed by ] |
| 16 | %b, %f and back references are not supported |
| 16 | rx takes a string literal or a const name; a pattern made while running is rex.compile |
| 16 | a counted repetition goes downwards |
| 16 | back references are not supported |
| 16 | this word takes a str and a regex: s re rex.match |
| 16 | the groups are named str parameters |
| 16 | this word takes the JSON text as a str |
| 16 | pack takes a row of a table of records and a buffer: row buf csv.pack |
| 18 | this name is already defined: give the function another with `as` |
| 18 | extern: int, handle, str and cstr arguments (eight for C at most), one int or handle result; or fail only with a handle result |
| 18 | extern: the host does not give this function |