[Bug translator/11473] New: Support optional "as VALUE" in foreach loops

jistone at redhat dot com sourceware-bugzilla@sourceware.org
Tue Apr 6 22:08:00 GMT 2010


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.



More information about the Systemtap mailing list