From 4b29e91a09e09ce66060e2be30e1707943e49a85 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 30 Dec 2022 15:05:30 -0800 Subject: awk: new feature, res variable. The res variable captures the specific value of the condition expression, making it available to the action. * autoload.c (awk_set_entries): Intern the res symbol * stdlib/awk.tl (awk): Instead of generating the condition-action into a simple when, we use whenlet to also bind the res variable. * tests/015/awk-res.tl: New file. * txr.1: Documented. * stdlib/doc-syms.tl: Updated. --- autoload.c | 1 + 1 file changed, 1 insertion(+) (limited to 'autoload.c') diff --git a/autoload.c b/autoload.c index 30d388ba..72e89e9e 100644 --- a/autoload.c +++ b/autoload.c @@ -352,6 +352,7 @@ static val awk_set_entries(val fun) lit("<-"), lit("!>"), lit("