Yazoo ---> Online Help Docs ---> Reference ---> Errors

Compile errors


ID name ID name
0 passed (no error) 17 not a number
1 out of memory 18 not a string
2 unexpected end of script 19 missing arguments
3 end of line expected 20 must follow if
4 end of script expected 21 conditional expected
5 unknown command 22 "end if" expected
6 invalid command 23 "end for" expected
7 argument expected 24 "end while" expected
8 no left-hand argument allowed 25 "until" expected
9 no right-hand argument allowed 26 `in" expected
10 variable or number expected 27 `[' expected
11 variable expected 28 `,' expected
12 `]' expected 29 illegal control command
13 `}' expected 30 unexpected control terminator
14 `)' expected 31 not a statement
15 overflow 32 unknown error
16 underflow    

Compiler errors, by number


`)' expected (#14)

A left parenthesis was not matched by a corresponding right parenthesis, or else a spurious symbol (such as a right bracket) appeared before the right parenthesis. Parentheses are used both to group parts of expressions, and to run functions; in both cases both left- and right-parentheses must be present.


`,' expected (#28)

A comma, denoting the second half of a range, was not found when it was expected. The only place that a full range (starting and ending point), rather than just a singe index, has to be given is in a for statement; if only one number is given there then this error is thrown.


`[' expected (#27)

There was no left bracket following the in keyword in a for-loop. Each for-loop needs to give a range for the loop counter, which goes within brackets immediately after the in keyword.


`]' expected (#12)

An expression did not end with a closing right-bracket as it was supposed to. Both array-index operators and the range of a for statement are enclosed in brackets.


`}' expected (#13)

An expression that was supposed to end with a closing right-brace did not. A right brace is expected to the end any code block or composite object, such as a function, set, or composite variable.


Argument expected (#7)

An operator was missing an argument, either to the left or to the right. For example, the following two lines cause this error:


    a = + 2
    b =
   

In the first line, the addition operator was missing its left argument; in the second case equate was lacking a right-hand argument.


Conditional expected (#21)

An if, while or until was found that had nothing after it. Each of these statements needs a condition, such as the `2 > 1' part of


    if 2 > 1, ...
   

If this part is missing, then a conditional-expected error is generated.


`End for' expected (#23)

A for statement did not close with a end for or, equivalently, endf. That means that either the end of the script or a different ending-marker (like end while) was encountered when the compiler was expecting the end of a for block.


`End if' expected (#22)

An if statement did not have a closing end if or endif. Either the compiler reached the end of the script without finding one of these, or it found a different ending-marker (like end while).


`End while' expected (#24)

An while block did not end with end while or endw. If the compiler encounters either the end of the script, or else a different ending-marker (like until) first, then it will throw this error.


End of line expected (#3)

A line of script continued after Yazoo expected it to end. The end of a line is marked by either an end-of-line character or carriage return, or a comma.

Certain reserved words, such as else and endw, require that the line end immediately afterwards; otherwise this error is thrown. The following code will cause this error, but it could be fixed by adding a comma between the else and print().


    if ...
    else print("no")   | incorrect
   

The second situation that causes an eol-expected error is when a `&', which breaks a sentence of script over separate lines, is followed by code on the same line, as in:


    result = a + b + c & + d
          + e + f
   

The line-continuation operator needs to be the last operator on the old line.


End of script expected (#4)

For some reason, the Yazoo compiler finished without encountering a null character, indicating an end of script. The user does not need to write in the null character to the strings that are sent to the compiler; Yazoo does that automatically. This must be some `safety' error code for an unknown contingency; it is quite possible that this error could never be thrown.


Illegal control command (#29)

A line began with a flow-control marker that cannot begin lines, such as step or in. These are reserved words which cannot be used for variable names.


`In' expected (#26)

There was no in operator in a for-loop, or else it was in the wrong place. The correct syntax is to write `in', then the range in brackets, following the loop counter.


Invalid command (#6)

An operator has an argument of the wrong type. For example, numeric operators expect numeric arguments, so something nonsensical like


    a = 3 + code
   

will cause this error.


Missing arguments (#19)

An argument-list was expected and none was found. The user's functions are regular objects, so they don't have to have an argument list after the function name. However, Yazoo's own built-in functions are different -- they always have to be executed, by writing the (possibly empty) argument list after the function name. For example,


    a = abs
   

causes this error, because abs is a reserved function that can only be run, not an object that can be copied directly from without running.


Must follow if (#20)

The compiler encountered an elseif or else without first encountering an if statement. These two words can only appear within an if block: i.e. after the if and before the endif.


No left-hand argument allowed (#8)

An operator had an argument to the left that it was not allowed to have. For example, the following line


    a = return
   

will cause this error. Because the return operator has low precedence, the compiler grouped the expression to the left and construed that expression as a left-hand argument to return, which is only supposed to have an argument on the right.


No right-hand argument allowed (#9)

An operator had an argument to the right that it was not allowed to have. A confused C programmer might throw this error by writing:


    a := *b
   

The only way to interpret `b' is as a right-hand argument to the asterisk, which because of the context is taken to be the void. The void takes no arguments, so this causes an error.


Not a number (#17)

The compiler tried to read a number that didn't follow the expected format. The format for a decimal number is a series of numeric digits (0-9) that may contain a single decimal point somewhere and, optionally, a minus-sign prefix (but not a plus sign!), and may contain an exponent suffix. The optional suffix consists of an `e' or `E' followed by a number (with an optional minus sign) that gives the base-10 exponent. No spaces may appear anywhere in the number, even between the number and the suffix. A valid decimal constant is:


    -9.17e-17
   

Hexadecimal constants can also be written, and they have three differences with decimal constants. 1) A hexadecimal constant begins with a `$'. 2) The numeric digits of a hexadecimal constant include the six letters `A' through `F' or their lowercase equivalents. 3) The base-16 exponent of a hexadecimal is denoted by a `H' or `h' rather than `E' or `e'. The exponent is, however, written in base-10. Thus:


    $-AC000000000h-10
   

is equivalent to $-A.C since the decimal point was shifted 10 (not 16) hexadecimals to the left.


Not a statement (#31)

Some operator that is not allowed to begin did. Many things that are not officially allowed to begin lines in practice are, since Yazoo will insert a prefix (like `something := ...') to make it into a legal line. However, in cases where this prefix would not make sense, like


    a /= b
   

then this error will be thrown.


Not a string (#18)

A string didn't follow the allowed format. Strings begin and end with a double-quotation-mark character: ". The string must all be written on one line; the line-continuation operator `&' does not work inside strings. A line break (other than a comma) within a string causes this error, as does the presence of a null character. These and other special characters can be encoded with escape sequences, which if not done properly is the other way to cause this error.

Each escape sequence begins with a backslash `\' character. The characters that have special escape sequences are the end-of-line sequence `\n' (which is not a carriage return!), the tab sequence `\t', a backslash `\\' and a double-quotation mark `\"'. More generally, any character can be written into a string by specifying its ASCII code with two hexadecimal (0 through F/f) digits after the initial backslash. There must be two digits -- characters before ASCII-16 have a zero as their first digit. The sequence "\4A", for example, represents the character `J'.


Out of memory (#1)

Yazoo was not able to allocate memory while compiling a script. This usually means that Yazoo ran out of memory, or that the program tried to allocate a block of memory that was larger than some maximum set by the operating system (i.e. on a DOS/Windows machine). Try compiling a smaller script.


Overflow (#15)

The compiler tried to read a numeric constant that was larger in magnitude than the maximum that will fit in a double-precision variable. For negative numbers this means that the number was less than the most negative allowed number. For example, writing the number 5e999 causes this error.


Unexpected control terminator (#30)

The Yazoo compiler ran into some end-of-block marker like endif or until, outside of any flow-control-block command like if or do. A different error will be generated if an ending marker follows the wrong flow-control command.


Unexpected end of script (#2)

A null character was encountered in mid-script. Usually, or perhaps always, the presence of a spurious null character will actually cause a different error, but this `safety' error code is reserved for some unforeseen problem that would slip past the other error checks.


Underflow (#16)

A number was encountered which was so small that it was read as zero. This particular error is currently ignored by the compiler, so it should not be encountered when compiling. Its only relevance has to do with the fact that the built-in read_string() function uses the compiler's number-reading machinery, and during runtime that function will throw a number-read warning upon underflow.


Unknown command (#5)

The compiler encountered some mysterious symbol which it cannot recognize as an operator. For example, the following will cause this error


    a = %
   

because a percent sign has no use in Yazoo.


Unknown error (#32)

Something strange and unclassifiable happened. This error should never occur, and if it does then it probably indicates a bug in Yazoo.


`Until' expected (#25)

A do block did not end with until as it was supposed to. Either the compiler reached the end of the script first, or else the do block ended with some different ending-marker (like end for).


Variable expected (#11)

A number or symbol was found where a variable, register or function (which may return a variable) was expected. There are two situations that Yazoo expects to find a variable: 1) immediately following a for statement, and 2) immediately following a step-to-member `.' operator.


Variable or number expected (#10)

Yazoo expected to find either a number, a register, or the name of a variable or function (which might return a variable), and it found something else instead (usually a symbol of some sort). The three places in which Yazoo expects to find either an inlined number or a variable are: 1) within the brackets of a for loop; 2) after the step marker of a for loop; and 3) within the brackets of an index operator. The index operators are step-to-index/indices `[]', resize `[^]', and add-indices `[+]' and `+[]'. When two indices are given, both are required to have either numbers or names of potential members.


Prev: Linked-list errors   Next: Runtime errors


Last update: July 28, 2013

Get Yazoo scripting language at SourceForge.net. Fast, secure and Free Open Source software downloads