From a8f6b2dfdf729d289a62c47344bad59c8ef657f7 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Fri, 13 May 2022 19:12:38 +0200 Subject: [PATCH] add examples back --- examples/helloworld.isbpl | 4 ++++ examples/helloworldgen.isbpl | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 examples/helloworld.isbpl create mode 100644 examples/helloworldgen.isbpl diff --git a/examples/helloworld.isbpl b/examples/helloworld.isbpl new file mode 100644 index 0000000..c53475e --- /dev/null +++ b/examples/helloworld.isbpl @@ -0,0 +1,4 @@ +func main { + "Hello World!\n" puts + 0 +} \ No newline at end of file diff --git a/examples/helloworldgen.isbpl b/examples/helloworldgen.isbpl new file mode 100644 index 0000000..4aa7067 --- /dev/null +++ b/examples/helloworldgen.isbpl @@ -0,0 +1,22 @@ +"#stream.isbpl" include + +func main { + pop + def id "helloworld.isbpl" STREAM.create.file.out stream =id + def s "func main {\n \"Hello World!\\n\" puts\n 0\n}" _array =s + + def i 0 =i + while { i s alen lt } { + ( s i aget ) id STREAM.write stream + i inc + } + + id STREAM.close stream + + "Testing: \n" struppercase puts + "helloworld.isbpl" include + main pop + "TEST DONE\n" strlowercase puts + + 0 +}