This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/11473] New: Support optional "as VALUE" in foreach loops
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 6 Apr 2010 22:07:48 -0000
- Subject: [Bug translator/11473] New: Support optional "as VALUE" in foreach loops
- Reply-to: sourceware-bugzilla at sourceware dot org
The current foreach syntax is:
foreach (VAR in ARRAY [ limit EXP ]) STMT
foreach ([VAR1, VAR2, ...] in ARRAY [ limit EXP ]) STMT
I propose making it:
foreach (VAR in ARRAY [ as VALUE ] [ limit EXP ]) STMT
foreach ([VAR1, VAR2, ...] in ARRAY [ as VALUE ] [ limit EXP ]) STMT
This way we can avoid repeated array lookups for the common case that you're
only interested in ARRAY[VAR1,VAR2,...] anyway.
--
Summary: Support optional "as VALUE" in foreach loops
Product: systemtap
Version: unspecified
Status: NEW
Severity: enhancement
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: jistone at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11473
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.