Skip to content

Commit

Permalink
fix examples and update std
Browse files Browse the repository at this point in the history
  • Loading branch information
MESYETI committed May 31, 2024
1 parent ecc934c commit d8a7e04
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion examples/alias.cal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include "cores/select.cal"
include "std/io.cal"

alias int cell
"int.sizeof = " printlstr int.sizeof printdec new_line
"int.sizeof = " printstr int.sizeof printdec new_line

let int myInt
65 myInt !
Expand Down
2 changes: 1 addition & 1 deletion examples/error.cal
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ version Linux86
error
end

"Hello, world!" printlstr
"Hello, world!" printstr
10 changes: 5 additions & 5 deletions examples/inheritance.cal
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ struct Building : Thing
cell numWindows
end

"Thing.name = " printlstr Thing.name printdec new_line
"Thing.sizeof = " printlstr Thing.sizeof printdec new_line
"Building.name = " printlstr Building.name printdec new_line
"Building.numWindows = " printlstr Building.numWindows printdec new_line
"Building.sizeof = " printlstr Building.sizeof printdec new_line
"Thing.name = " printstr Thing.name printdec new_line
"Thing.sizeof = " printstr Thing.sizeof printdec new_line
"Building.name = " printstr Building.name printdec new_line
"Building.numWindows = " printstr Building.numWindows printdec new_line
"Building.sizeof = " printstr Building.sizeof printdec new_line
4 changes: 2 additions & 2 deletions examples/return.cal
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ include "cores/select.cal"
include "std/io.cal"

func returnExample begin
"Hello 1\r\n" printlstr
"Hello 1\r\n" printstr
return
"Hello 2\r\n" printlstr
"Hello 2\r\n" printstr
end

returnExample
8 changes: 4 additions & 4 deletions examples/structs.cal
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ struct Animal
end

# Print offsets
"Animal.name = " printlstr Animal.name printdec new_line
"Animal.sound = " printlstr Animal.sound printdec new_line
"Animal.name = " printstr Animal.name printdec new_line
"Animal.sound = " printstr Animal.sound printdec new_line

# Create animal instance
let Animal cat
"cat" cat Animal.name + a<
"mrrrp" cat Animal.sound + a<

# Print fields
"Name: " printlstr cat Animal.name + printstr new_line
"Sound: " printlstr cat Animal.sound + printstr new_line
"Name: " printstr cat Animal.name + printstr new_line
"Sound: " printstr cat Animal.sound + printstr new_line
2 changes: 1 addition & 1 deletion examples/unions.cal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ union MyUnion
Array
end

"MyUnion.sizeof = " printlstr MyUnion.sizeof printdec new_line
"MyUnion.sizeof = " printstr MyUnion.sizeof printdec new_line

let MyUnion foo

Expand Down
2 changes: 1 addition & 1 deletion std

0 comments on commit d8a7e04

Please sign in to comment.