From fecaaee99cad196b6dad268c2f03547d3b205959 Mon Sep 17 00:00:00 2001 From: crc Date: Sat, 14 Jul 2018 15:13:20 +0000 Subject: [PATCH] add new file words to rre/windows FossilOrigin-Name: d3131dad409e220ec5f0c47973e76619fb43a8fada9a10a26c3117611f522953 --- interfaces/rre_windows.forth | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/interfaces/rre_windows.forth b/interfaces/rre_windows.forth index ad6045f..f2a70e0 100644 --- a/interfaces/rre_windows.forth +++ b/interfaces/rre_windows.forth @@ -149,6 +149,18 @@ Given a file name, return `TRUE` if it exists or `FALSE` otherwise. [ drop FALSE ] choose ; ~~~ +~~~ +:file:open (s-nn) + file:R file:open dup file:size swap ; + +:file:open (s-nn) + file:A file:open dup file:size swap ; + +:file:open (s-n) + file:W file:open ; +~~~ + + With that out of the way, we can begin building higher level functionality. The first of these reads a line from the file. This is read to `here`; move