| 1 |
writeInfoLine: "Procedures" |
| 2 |
|
| 3 |
@colon (33,"ho,p"",""kkk", 5, "h") |
| 4 |
assert colon.result$ = "colon33ho,p"",""kkk5h" |
| 5 |
|
| 6 |
call old 1 a 2 b |
| 7 |
assert old.result$ = "old1a2b" |
| 8 |
@old (3, "a", 4, "b") |
| 9 |
assert old.result$ = "old3a4b" |
| 10 |
@old: 5, "a", 6, "b" |
| 11 |
assert old.result$ = "old5a6b" |
| 12 |
|
| 13 |
call new 1 a 2 b |
| 14 |
assert new.result$ = "new1a2b" |
| 15 |
@new (3, "a", 4, "b") |
| 16 |
assert new.result$ = "new3a4b" |
| 17 |
@new: 5, "a", 6, "b" |
| 18 |
assert new.result$ = "new5a6b" |
| 19 |
|
| 20 |
call colon 1 a 2 b |
| 21 |
assert colon.result$ = "colon1a2b" |
| 22 |
@colon (3, "a", 4, "b") |
| 23 |
assert colon.result$ = "colon3a4b" ; 'colon.result$' |
| 24 |
@colon: 5, "a", 6, "b" |
| 25 |
assert colon.result$ = "colon5a6b" |
| 26 |
|
| 27 |
@noarg1() |
| 28 |
@noarg1 ( ) |
| 29 |
@noarg1: |
| 30 |
@noarg1 |
| 31 |
@noarg1 |
| 32 |
call noarg1 |
| 33 |
|
| 34 |
@noarg2() |
| 35 |
@noarg2 ( ) |
| 36 |
@noarg2: |
| 37 |
@noarg2 |
| 38 |
@noarg2 |
| 39 |
;call noarg2 |
| 40 |
|
| 41 |
;asserterror The procedure "colon" expects 4 arguments but got only 3. |
| 42 |
;@colon (1, "a", 2) |
| 43 |
|
| 44 |
procedure old .a .b$ .c .d$ |
| 45 |
.result$ = "old" + string$ (.a) + .b$ + string$ (old.c) + .d$ |
| 46 |
endproc |
| 47 |
|
| 48 |
procedure new (.a, .b$, .c, .d$) |
| 49 |
.result$ = "new" + string$ (.a) + .b$ + string$ (new.c) + .d$ |
| 50 |
endproc |
| 51 |
|
| 52 |
procedure colon: .a, .b$, .c, .d$ |
| 53 |
.result$ = "colon" + string$ (.a) + .b$ + string$ (colon.c) + .d$ |
| 54 |
endproc |
| 55 |
|
| 56 |
procedure noarg1 |
| 57 |
appendInfoLine ("hoi1") |
| 58 |
endproc |
| 59 |
|
| 60 |
procedure noarg2 ( ) |
| 61 |
appendInfoLine ("hoi2") |
| 62 |
endproc |