diff options
Diffstat (limited to 'cppawk-cons.1')
-rw-r--r-- | cppawk-cons.1 | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cppawk-cons.1 b/cppawk-cons.1 index 64939af..f41abe0 100644 --- a/cppawk-cons.1 +++ b/cppawk-cons.1 @@ -108,7 +108,7 @@ cons \- Lisp-like data representation and control flow macros \fI// Field/list conversion\fP fields([\fIi \fP[, \fIn\fP]]) \fI// convert Awk positional fields to list\fP - set_fields(\fIx\fP) \fI// set Awk positional fields from list x\fP + set_fields(\fIx\fP[, \fIi\fP])\fI// set Awk positional fields from list x\fP \fI// list iteration\fP @@ -1974,7 +1974,7 @@ or unboxed objects. .ft B fields([\fIi \fP[, \fIn\fP]]) - set_fields(\fIx\fP) + set_fields(\fIx\fP[, \fIi\fP]) .ft R .B Description @@ -2013,9 +2013,16 @@ The .B set_fields function replaces the positional values with the contents of list .I x -setting +starting at position +.I i +which defaults to 1. +The last element of the list becomes the last field, whose index +therefore becomes the new value of the .B NF -to the length of the list. +variable. +If +.I i +is less than 1, it is ignored and the default value 1 is used. Since the fields and .B NF |