From 1c77097f7ebb99142ac349d98b3e87cb8b96020a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 5 Apr 2022 19:22:52 -0700 Subject: Add box_str function. --- cppawk-cons.1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cppawk-cons.1') diff --git a/cppawk-cons.1 b/cppawk-cons.1 index bdbbc5b..215d669 100644 --- a/cppawk-cons.1 +++ b/cppawk-cons.1 @@ -59,6 +59,7 @@ cons \- Lisp-like data representation and control flow macros box(av) // convert Awk number or string Lisp value. unbox(lv) // convert Lisp value to Awk number or string. + box_str(av) // create Lisp boxed string from Awk value av box_sym(av) // create Lisp symbol named av cons(a, d) // create cons cell with car = a and cdr = d. @@ -605,13 +606,14 @@ to distinguish numbers from non-numbers. symbolp("Sabc") -> 1 // manually produced symbol abc .ft R -.SS Functions \fIbox\fP, \fIunbox\fP and \fIbox_sym\fP +.SS Functions \fIbox\fP, \fIunbox\fP, \fIbox_str\fP and \fIbox_sym\fP .bk .B Syntax: .ft B box(av) unbox(lv) + box_str(av) box_sym(av) .ft R @@ -665,6 +667,11 @@ For any other value, .B unbox prints a diagnostic message and terminates the process. +The +.B box_str +function boxes an Awk value as a string, regardless of whether or +not it is numeric. + The .B box_sym function boxes an Awk value -- cgit v1.2.3