Yes. The foreach should iterate over a string variable. In this respect, a string can be considered a dynamic array of byte's. Arturo ________________________________ From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Surya Pratik Saha Sent: Wednesday, January 16, 2008 10:14 PM To: sv-ec@eda.org; sv-bc@eda.org Subject: [sv-ec] Is string valid data type for 'foreach' array Hi, SV 1800-2008 draft LRM defines 'foreach' array as follows: 12.7.3 The foreach loop The foreach-loop construct specifies iteration over the elements of an array. Its argument is an identifier that designates any type of array followed by a comma-separated list of loop variables enclosed in square brack-ets. Is 'string' type allowed as array. Is the following case valid? module top; string s; initial begin foreach (s[i]) begin end end endmodule -- Regards Surya -- This message has been scanned for viruses and dangerous content by MailScanner <http://www.mailscanner.info/> , and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Jan 16 23:02:40 2008
This archive was generated by hypermail 2.1.8 : Wed Jan 16 2008 - 23:03:57 PST