From 7f06ce6600998be353b80869fc61a5b6dc2d9691 Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Wed, 6 Jan 2021 17:19:53 +0900 Subject: [PATCH] Add defined? --- bootstrap.fs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap.fs b/bootstrap.fs index 0e7b354..23b0896 100644 --- a/bootstrap.fs +++ b/bootstrap.fs @@ -2118,6 +2118,9 @@ codegen-target @ s" no-codegen" str= not [if] abort [then] [then] \ End of environment dependent code +: defined? ( "name" -- f ) + word throw find <> 0 +; : need-defined ( "name" -- ) word throw dup find unless