From fee9325155efdfb0e19b316d2b961270dfba2fd5 Mon Sep 17 00:00:00 2001 From: David Ashby Date: Sat, 20 Feb 2021 18:59:41 -0500 Subject: [PATCH] comment on the nature of truth and falsehood --- builtins.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/builtins.go b/builtins.go index 1281887..0f94d76 100644 --- a/builtins.go +++ b/builtins.go @@ -7,7 +7,13 @@ import ( "os" ) +// FALSE is a flag for, what else, false var FALSE = 0 + +// TRUE is a flag for, what else, true. +// It's -1 because historically, FORTHs would define TRUE as "all bits set to 1 in a cell", +// and interpreting that literally flips the sign flag in a signed integer. +// More generally, TRUE is defined as "not FALSE" for most purposes, and any non-zero integer will work. var TRUE = -1 // Builtins is a handy holder for our various default words