From 0ad39c713f1d0239abda6cece563c0964a1ea5e0 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 25 Sep 2016 07:06:41 -0700 Subject: awk macro: handle dynamic changes in rs variable. * awk.tl (sys:awk-state loop): The loop now notices when rs or krs changes and switches to a new record-adapter or to the raw stream as necessary. * txr.1: Notes added about changes to rs and krs. --- txr.1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index e77dcb03..00822132 100644 --- a/txr.1 +++ b/txr.1 @@ -38563,6 +38563,12 @@ If a match for the record separator occurs at the end of the stream, it is not considered to delimit an empty record, but acts as the terminator for the previous record. +When a new value is assigned to +.codn rs , +it has no effect on the most recently scanned and delimited record which is +still current, or previous records. The new value applies to the next, not yet +read record. + .coNP Variable @ krs .desc The awk variable @@ -38575,6 +38581,12 @@ by the pattern in the .code rs variable is retained as part of the preceding record rather than removed. +When a new value is assigned to +.codn krs , +it has no effect on the most recently scanned and delimited record which is +still current, or previous records. The new value applies to the next, not yet +read record. + .coNP Variables @ fs and @ ft .desc The awk variable -- cgit v1.2.3