Skip to content
Snippets Groups Projects
Commit d123e793 authored by Mark Wheelhouse's avatar Mark Wheelhouse
Browse files

Merge branch 'master' of gitlab.doc.ic.ac.uk:lab1920_spring/wacc_examples

parents 29e2fbce e29bd3fe
No related branches found
No related tags found
No related merge requests found
No preview for this file type
# type mismatch: string <- char[]
# Output:
# #semantic_error#
# Exit:
# 200
# Program:
begin
string s = ['h','i','!'];
println s
end
# bad integer assignments
# bad integer assignments - multiple syntax errors
# Output:
# #syntax_error#
......
# bad integer assignment - whitespace should delimit ints
# Output:
# #syntax_error#
# Exit:
# 100
# Program:
begin
int x = 22 0
end
# bad integer assignments - malformed int literal
# Output:
# #syntax_error#
# Exit:
# 100
# Program:
begin
int y = 1A4
end
......@@ -214,7 +214,7 @@ begin
end
# Print out the question, and then read an integer. After that print the integer back and return it.
int askForInt(char[] message) is
int askForInt(string message) is
print message ;
int x = 0 ;
read x ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment