From 5dc837bfc3412b70e9008cf38e6226a61afbcaa3 Mon Sep 17 00:00:00 2001 From: mryouse Date: Sat, 9 Jul 2022 01:57:46 +0000 Subject: remove 'with-write' blocks, those will come with macros(?) --- neighborcat/neighborcat.neb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/neighborcat/neighborcat.neb b/neighborcat/neighborcat.neb index 1c3b02a..5a2d5c2 100644 --- a/neighborcat/neighborcat.neb +++ b/neighborcat/neighborcat.neb @@ -75,9 +75,10 @@ ; go to the porch (def target-eats-stem (last (split target-eats "/"))) (def target-porch (user-from-path target-eats)) - (with-write (concat HOME target-porch PORCH NAME) - (write CAT _file_) - (write (concat "thank you for the " target-eats-stem "!\n") _file_))) + (def cat-file (open-write (concat HOME target-porch PORCH NAME))) + (write CAT cat-file) + (write (concat "thank you for the " target-eats-stem "!\n") cat-file) + (close cat-file)) (func init () ; create the new porch and bowl @@ -110,7 +111,7 @@ (block (print (concat "you already have " (first food) " in your bowl!")) (exit))) - (with-write (concat HOME USER BOWL "/" (first food))) + (close (open-write (concat HOME USER BOWL "/" (first food)))) (print (concat "you left some " (first food) " for " NAME "!"))) (func help () -- cgit v1.2.3