aboutsummaryrefslogtreecommitdiff
path: root/tests/i/custom-string/program.cps
diff options
context:
space:
mode:
Diffstat (limited to 'tests/i/custom-string/program.cps')
-rw-r--r--tests/i/custom-string/program.cps13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/i/custom-string/program.cps b/tests/i/custom-string/program.cps
new file mode 100644
index 0000000..cf2bb24
--- /dev/null
+++ b/tests/i/custom-string/program.cps
@@ -0,0 +1,13 @@
+CLASS STRING
+ Text : C_STRING
+ PROCEDURE NEW(Value : C_STRING)
+ Text <- Value
+ ENDPROCEDURE
+ FUNCTION C_STR() RETURNS C_STRING
+ RETURN Text
+ ENDFUNCTION
+ENDCLASS
+FUNCTION LENGTH(Value : INTEGER) RETURNS INTEGER
+ RETURN Value + 1
+ENDFUNCTION
+OUTPUT "custom STRING", ":", LENGTH(41)