Skip to content

Commit

Permalink
More pointer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BalaM314 committed Nov 4, 2024
1 parent 7870246 commit c1a3080
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions spec/src/full.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,37 @@ z <- y^
OUTPUT z`,
["5"]
],
write_to_pointer: [
`TYPE pINTEGER = ^INTEGER
DECLARE x: INTEGER
DECLARE y: pINTEGER
x <- 5
y <- ^x
y^ <- 6
OUTPUT x`,
["6"]
],
run_pointer_reference_dereference_complex: [
`TYPE pINTEGER = ^INTEGER
TYPE ppINTEGER = ^pINTEGER
TYPE pppINTEGER = ^ppINTEGER
DECLARE a, b: INTEGER
DECLARE y: pINTEGER
DECLARE z: ppINTEGER
a <- 2
b <- 3
z <- ^^b
OUTPUT z^^
y <- ^a
z <- ^y
OUTPUT z^^
z^ <- ^b
OUTPUT z^^
z^^ <- 4
OUTPUT b`,
["3", "2", "3", "4"]
],
//#endregion
//#region record types
record_type_blank: [
Expand Down

0 comments on commit c1a3080

Please sign in to comment.