This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]