xref: /illumos-gate/usr/src/test/util-tests/tests/awk/gnu/nlstrina.awk (revision ed093b41a93e8563e6e1e5dae0768dda2a7bcc27)
1# From E.Ab@chem.rug.nl  Wed Aug  2 13:16:53 2000
2# Received: from mail.actcom.co.il
3# 	by localhost with POP3 (fetchmail-5.1.2)
4# 	for arnold@localhost (single-drop); Wed, 02 Aug 2000 13:16:53 -0400 (EDT)
5# Received: from lmail.actcom.co.il by actcom.co.il  with ESMTP
6# 	(8.9.1a/actcom-0.2) id MAA21699 for <arobbins@actcom.co.il>;
7# 	Wed, 2 Aug 2000 12:20:38 +0300 (EET DST)
8# 	(rfc931-sender: lmail.actcom.co.il [192.114.47.13])
9# Received: from freefriends.org (freefriends.org [63.85.55.109])
10# 	by lmail.actcom.co.il (8.9.3/8.9.1) with ESMTP id LAA22723
11# 	for <arobbins@actcom.co.il>; Wed, 2 Aug 2000 11:23:22 +0300
12# Received: from mescaline.gnu.org (mescaline.gnu.org [158.121.106.21])
13# 	by freefriends.org (8.9.3/8.9.3) with ESMTP id FAA23582
14# 	for <arnold@skeeve.com>; Wed, 2 Aug 2000 05:18:59 -0400
15# Received: from dep.chem.rug.nl (dep.chem.rug.nl [129.125.7.81])
16# 	by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id FAA30670;
17# 	Wed, 2 Aug 2000 05:20:24 -0400
18# Received: from rugmd34.chem.rug.nl (rugmd34.chem.rug.nl [129.125.42.34])
19# 	by dep.chem.rug.nl (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id LAA17089;
20# 	Wed, 2 Aug 2000 11:20:23 +0200
21# Received: from chem.rug.nl (localhost [127.0.0.1]) by rugmd34.chem.rug.nl (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id LAA25392; Wed, 2 Aug 2000 11:20:22 +0200 (MDT)
22# Sender: E.Ab@chem.rug.nl
23# Message-ID: <3987E7D5.2BDC5FD3@chem.rug.nl>
24# Date: Wed, 02 Aug 2000 11:20:21 +0200
25# From: Eiso AB <E.Ab@chem.rug.nl>
26# X-Mailer: Mozilla 4.72C-SGI [en] (X11; I; IRIX 6.5 IP32)
27# X-Accept-Language: en
28# MIME-Version: 1.0
29# To: bug-gnu-utils@gnu.org, arnold@gnu.org
30# Subject: bug? [GNU Awk 3.0.5]
31#
32# Content-Type: text/plain; charset=us-ascii
33# Content-Transfer-Encoding: 7bit
34# X-UIDL: \f8"!(8G!!ZL$#!h>X!!
35# Status: R
36#
37# hi Arnold,
38#
39#
40# Please try the script beneath...
41# I'm not sure if this is a bug or not, but I would expect
42# the empty string as an array index just to be treated
43# like any other string
44#
45# so if ("" in ta) would be true, and for ( i in ta ) should loop only once.
46#
47BEGIN {
48        v=""
49        ta[v]++
50        if ( v in ta) print "a",v,++ta[v],ta[v]
51	print "b",v,++ta[v],ta[v]
52        for( i in ta) print "c",++c,i,ta[i]
53}
54#
55# goodluck, Eiso
56#
57# --
58#                                 _________
59# _______________________________/ Eiso AB \_________________________
60#
61#            o
62#
63#                  o               Dept. of Biochemistry
64#                                  University of Groningen
65#                                  The Netherlands
66#                   o
67#             . .
68#          o   ^                   mailto:eiso@chem.rug.nl
69#          |   -   _               mailto:eiso@dds.nl
70#           \__|__/                http://md.chem.rug.nl/~eiso
71#              |	                 tel 4326
72#              |
73#             / \
74#            /   \
75#            |   |
76# ________ ._|   |_. ________________________________________________
77#
78