From aaf427354e301c940e440bd0360512df1d8438be Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 31 Dec 2020 06:32:03 -0800 Subject: doc: improve awk fconv documenation. * txr.1: List the no-conversion - operator among the shortcuts, so it is easier to discover. Add a note that that fconv is potentially applicable to non-string fields. --- txr.1 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/txr.1 b/txr.1 index 8f9260d4..98612ad7 100644 --- a/txr.1 +++ b/txr.1 @@ -58372,6 +58372,8 @@ Thus fields which are non-numeric strings or the object .code nil get converted to 0, or 0.0 in the case of .codn rz . +.coIP - +Performs no conversion: the corresponding field is taken as-is. .RE .IP Because @@ -58399,6 +58401,20 @@ expression can be used as the condition in an clause which triggers the action if one or more fields have been extracted, and performs conversions on them. + +Note: although +.code fconv +is intended for converting textual fields, and the semantic descriptions below +consequently make references to string inputs, the behavior of +.code fconv +with respect to non-string fields can be inferred. For instance if a field +actually holds the floating-point value 3.14, and the +.code i +conversion is applied to it, it will produce 3, because it works by +means of the +.code toint +function which. + .TP* Examples: .verb -- cgit v1.2.3