bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] nested loop of arbitary number of elements in a hash of hash


From: Peng Yu
Subject: [bug-gawk] nested loop of arbitary number of elements in a hash of hash
Date: Wed, 3 Apr 2019 15:04:00 -0500

Hi,

"input" is a hash of hash. The following example is a nested loop
assuming there are only "1" "2" and "3" in the first level of the
hash. If there are an arbitrary number of elements in the first level,
what is the best way to construct a nested loop? Thanks.

  for(j1 in input[1]) {
    for(j2 in input[2]) {
      for(j3 in input[3]) {
# do something
      }
    }
  }

-- 
Regards,
Peng



reply via email to

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