Wheel IDE

Online demo »

Compiler, errors

Errors

This page contains a list of compiler errors. This page more work to provide more details.

FILE_NOT_FOUND

#include "notfound.whl"
proc main()
end
Error #1 File not found: "notfound.whl".

FILENAME_EXPECTED

#include
proc main()
end
Error #2 Filename expected.

FILENAME_EXPECTED

#include
proc main()
end
Error #2 Filename expected.

FILENAME_EXPECTED

#include 1
proc main()
end
Error #2 Filename expected.

FILENAME_EXPECTED

#image
proc main()
end
Error #2 Filename expected.

RGF_EXTENSION_EXPECTED

#image "test.bmp"
proc main()
end
Error #3 ".rgf" Extension expected.

DATA_EXPECTED

#image "test.rgf"
proc main()
end
Error #4 "#data" Expected.

DATA_STRING_EXPECTED

#image "test.rgf"
#data
proc main()
end
Error #5 Data string expected.

DATA_STRING_EMPTY

#image "test.rgf"
#data ""
proc main()
end
Error #6 Data string is empty.

DATA_STRING_INVALID_CHARACTER

#image "test.rgf"
#data "020"
proc main()
end
Error #7 Data string can only contain "0" or "1".

DATA_STRING_LENGTH_MISMATCH

#image "test.rgf"
#data "010"
#data "0100"
proc main()
end
Error #8 Data string length mismatch.

UNDEFINED_META_COMMAND

#wrong 1
proc main()
end
Error #12 Undefined meta command.

ON_OR_OFF_EXPECTED

#optimizer "wrong"
proc main()
end

Error 13 "on" or "off" expected.

NUMBER_FLOAT_OR_INT_EXPECTED

#datatype "wrong"
proc main()
end

Error 14 "number", "float" or "int" expected.

SYNTAX_ERROR_DOT_EXPECTED

record Rec
    number n
end
proc main()
    Rec r
    r() = 1
end
Error #16 "." Expected got "(".

SYNTAX_ERROR_BRACKET_OPEN_EXPECTED

record Point
    number x, y
end
proc main()
    Point p[2] = {1, 2}
end
Error #17 "[" Expected.

SYNTAX_ERROR_BRACKET_CLOSE_EXPECTED

proc test(number n[3])
end
proc main()
    test([1, 2, 3, 4])
end
Error #18 "]" Expected.
proc test(number n[3])
end
proc main()
    test([1, 2, 3)
end
Error #18 "]" Expected.

SYNTAX_ERROR_NUMBER_CONSTANT_EXPECTED

proc test(number n[3])
end
proc main()
    test([1, x, 3])
end
Error #19 Number constant expected, got "x".
record Rec
    number n
end
proc test(Rec r)
end
proc main()
    test({"wrong"})
end
Error #19 Number constant expected, got ""wrong"".
number n[2] = [a,1]
proc main()
end
Error #19 Number constant expected, got "a".

SYNTAX_ERROR_STRING_CONSTANT_EXPECTED

proc test(string s[2])
end
proc main()
    test([1, 2])
end
Error #20 String constant expected, got "1".

record Rec
    string s
end
proc test(Rec r)
end
proc main()
    test({1})
end
Error #20 String constant expected, got "1".
string s[2] = [0,1]
proc main()
end
Error #20 String constant expected, got "0".

UNDEFINED_IDENTIFIER

proc main()
    x = 12
end
Error #22 Undefined identifier "x".
proc test()
    ret y
end
proc main()
end
Error #22 Undefined identifier "y".
proc main()
    addr line.p[1].x
end
Error #22 Undefined identifier "line".
proc test(x n)
end
proc main()
end
Error #22 Undefined identifier "x".
proc main()
    number a[10]
    a[b] = 1
end
Error #22 Undefined identifier "b".
record Rec
    x n
end
proc main()
end
Error #22 Undefined identifier "x".

UNDEFINED_FIELD

record Rec
    number f
end
proc main()
    Rec r
    r.g = 1
end
Error #23 Undefined field "g".

UNEXPECTED_END_OF_FILE

proc main()
Error #24 Unexpected end of file.

UNEXPECTED_CODE_AFTER_META

#include "standard.whl" Wrong
proc main()
end
Error #25 Unexpected code after "#include".
#define CONST 1 Wrong
proc main()
end
Error #25 Unexpected code after "#define".
#heap 456, 1
proc main()
end
Error #25 Unexpected code after "#heap".
#optimizer "on", 1
proc main()
end
Error #25 Unexpected code after "#optimizer".

DUPLICATE_IDENTIFIER

proc test(number n, number n)
end
proc main()
end
Error #26 Duplicate identifier "n".
proc test()
end
proc test()
end
proc main()
end
Error #26 Duplicate identifier.

TYPE_MISMATCH

proc test(number n)
end
proc main()
    test([1])
end
Error #27 Type mismatch.
proc test(number n)
end
proc main()
    test({1})
end
Error #27 Type mismatch.
record Rec
    number i
end
proc main()
    Rec r
    number i
    i = r * 2
end
Error 27 Type mismatch.
proc main()
    number n
    string p
    n = p
end
Error #27 Type mismatch.
proc main()
    string a
    string ^b
    a = b
end
Error #27 Type mismatch.
proc main()
    string a
    string b
    a = @b
end
Error #27 Type mismatch.

RECORD_TYPE_EXPECTED

proc main()
    number n
    n.a = 10
end
Error #28 Record type expected.

ARRAY_TYPE_EXPECTED

proc test(number n[2])
end
proc main()
    number x
    test(x)
end
Error #30 Array type expected.
proc main()
    number n
    n[5] = 10
end
Error #30 Array type expected.

ARRAY_SIZE_MISMATCH

proc test(number n[2])
end
proc main()
    number x[3]
    test(x)
end
Error #31 Array size mismatch.
proc main()
    number a[3]
    number b[2]
    a = b
end
Error #31 Array size mismatch.

ARRAY_INDEX_OUT_OF_RANGE

proc main()
    number n[4]
    n[5] = 1
end
Error #32 Array index out of range.

STRING_CONSTANT_EXPECTED

string s = 10
proc main()
end
Error #33 String constant expected.
#project 1
proc main()
end
Error #33 String constant expected.
#optimizer 1
proc main()
end
Error #33 String constant expected.

NUMBER_OR_STRING_CONSTANT_EXPECTED

#define CONST end
proc main()
end
Error #34 Number or string constant expected.

NUMBER_CONSTANT_EXPECTED

proc main()
    number n[a]
end
Error #35 Number constant expected.
number n = "string"
proc main()
end
Error #35 Number constant expected.
#heap "off"
proc main()
end
Error #35 Number constant expected.

NUMBER_TYPE_EXPECTED

proc main()
    proc p
    select p
    end
end
Error #36 Number type expected.

POINTER_TYPE_EXPECTED

proc test(number n)
end
proc main()
    number x
    test(@x)
end
Error #37 Pointer type expected.
proc main()
    number n
    number p
    n = @p
end
Error #37 Pointer type expected.
proc main()
    string ^a
    string b
    a = b
end
Error #37 Pointer type expected.
record Point
    number n
end
proc main()
    Point a
    Point b
    a = @b
end
Error #37 Pointer type expected.

IDENTIFIER_EXPECTED

#define end 0
proc main()
end
Error #38 Identifier expected.

BREAK_WITHOUT_LOOP

proc main()
    break
end
Error #39 Break without loop.

MISSING_MAIN_PROC

proc test()
end
Error #40 Missing main proc.

MAIN_PROC_ALREADY_DEFINED

proc main()
end
proc main()
end
Error #41 Main proc already defined.

NO_LOCAL_PROC_SUPPORTED

proc main()
    proc test()
    end
end
Error #42 No local proc allowed.

PARAM_COUNT_MISMATCH

proc test(number n)
end
proc main()
    test()
end
Error #43 Parameter count mismatch.
proc test(number n)
end
proc main()
    test(1, 2)
end
Error #43 Parameter count mismatch.

PARAM_TYPE_MISMATCH

record Point
    number x
end
proc test(number p)
end
Point p
proc main()
    test(p)
end
Error #44 Parameter type mismatch.
record Point
    number x
    number y
end
proc test(Point p)
end
Point p
proc main()
    test(1)
end
Error #44 Parameter type mismatch.

ITEM_COUNT_MISMATCH

number n[3] = [0,1]
proc main()
end
Error #45 Item count mismatch.

INVALID_CONSTANT

record R
    number n
end
R n = 1
proc main()
end
Error #46 Invalid constant.

INVALID_ARRAY_SIZE

record Rec
    number n[0]
end
proc main()
end
Error #47 Invalid array size.

INVALID_ARRAY_INDEX

proc main()
    number n[4]
    n[-1] = 1
end
Error #48 Invalid array index.

INVALID_OPERATION

proc main()
    string s
    s *= s
end
Error #49 Invalid operation.
proc main()
    string a, b
    a = b * 2
end
Error #49 Invalid operation.

INVALID_STATEMENT_IN_SCOPE

ret
Error #51 Invalid statement in scope.
break
Error #51 Invalid statement in scope.

INVALID_CONSTANT_IN_SCOPE

proc test()
end
number i = test()
proc main()
end
Error #51 Invalid constant value in scope.
number n = a
proc main()
end
Error #51 Invalid constant value in scope.