[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Field Separator: gawk Documentation Issue

From: Aharon Robbins
Subject: Re: Field Separator: gawk Documentation Issue
Date: Thu, 10 Jul 2008 18:47:32 +0300

Greetings. Thank you for your note.

> Date: Thu, 10 Jul 2008 16:50:12 +0200
> From: address@hidden
> Subject: Field Separator: gawk Documentation Issue
> To: address@hidden
> The documentation states that FS must be either a string of length
> 0 or 1, or a regexp.
> The documentation does not say what happens if FS is a string of 
> length greater than one. 

It is not clear which documentation you mean: the man page or
the texinfo manual?

The texinfo manual makes it very clear that the contents of a string
greater than length one are interpreted as a regular expression, and it
thus is defined.

Other parts of the manual explain why

        var = /regexp/

does not assign the regexp to the variable var but does something
else entirely.

> I think it would be clearer if either
> - the documentation explains what happens if you set FS to such a string
> (even if it says "undefined behaviour", it would be helpful), or

The texinfo manual does.

> - that the implementation outputs an error message in this case

Neither   FS = "string"   or   FS = /regexp/  are syntactically
invalid, and they both have well-defined semnatics.

The man page does not give all the gory details; the texinfo manual



reply via email to

[Prev in Thread] Current Thread [Next in Thread]