Go forward to S5R4.
Go backward to Language History.
Go up to Language History.
Major Changes between V7 and S5R3.1
===================================
The `awk' language evolved considerably between the release of
Version 7 Unix (1978) and the new version first made widely available in
System V Release 3.1 (1987). This section summarizes the changes, with
cross-references to further details.
* The requirement for `;' to separate rules on a line (*note `awk'
Statements versus Lines: Statements/Lines.).
* User-defined functions, and the `return' statement (
see User-defined Functions: User-defined.).
* The `delete' statement (see The `delete' Statement: Delete.).
* The `do'-`while' statement (see The `do'-`while' Statement: Do Statement.).
* The built-in functions `atan2', `cos', `sin', `rand' and `srand'
(see Numeric Built-in Functions: Numeric Functions.).
* The built-in functions `gsub', `sub', and `match' (*note Built-in
Functions for String Manipulation: String Functions.).
* The built-in functions `close', which closes an open file, and
`system', which allows the user to execute operating system
commands (see Built-in Functions for Input/Output: I/O Functions.).
* The `ARGC', `ARGV', `FNR', `RLENGTH', `RSTART', and `SUBSEP'
built-in variables (see Built-in Variables.).
* The conditional expression using the operators `?' and `:' (
see Conditional Expressions: Conditional Exp.).
* The exponentiation operator `^' (see Arithmetic Operators: Arithmetic Ops.) and its assignment operator form `^=' (*note
Assignment Expressions: Assignment Ops.).
* C-compatible operator precedence, which breaks some old `awk'
programs (see Operator Precedence (How Operators Nest): Precedence.).
* Regexps as the value of `FS' (*note Specifying how Fields are
Separated: Field Separators.), and as the third argument to the
`split' function (*note Built-in Functions for String
Manipulation: String Functions.).
* Dynamic regexps as operands of the `~' and `!~' operators (
see How to Use Regular Expressions: Regexp Usage.).
* Escape sequences (see Constant Expressions: Constants.) in
regexps.
* The escape sequences `\b', `\f', and `\r' (*note Constant
Expressions: Constants.).
* Redirection of input for the `getline' function (*note Explicit
Input with `getline': Getline.).
* Multiple `BEGIN' and `END' rules (*note `BEGIN' and `END' Special
Patterns: BEGIN/END.).
* Simulated multi-dimensional arrays (*note Multi-dimensional
Arrays: Multi-dimensional.).