public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/4591] New: println function
@ 2007-06-04 16:14 fche at redhat dot com
  2007-06-07  0:22 ` [Bug translator/4591] " joshua dot i dot stone at intel dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: fche at redhat dot com @ 2007-06-04 16:14 UTC (permalink / raw)
  To: systemtap

As a space-saver measure, I'd like to have a function like pascal's println
in the systemtap language:
  println (EXPR [, EXPR]...)
which would be equivalent (rewritten) to:
  printf ("%.%.%.\n", EXPR, EXPR2, EXPR3)

-- 
           Summary: println function
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: fche at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=4591

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug translator/4591] println function
  2007-06-04 16:14 [Bug translator/4591] New: println function fche at redhat dot com
@ 2007-06-07  0:22 ` joshua dot i dot stone at intel dot com
  2007-08-14  4:59 ` joshua dot i dot stone at intel dot com
  2007-08-17  2:25 ` joshua dot i dot stone at intel dot com
  2 siblings, 0 replies; 4+ messages in thread
From: joshua dot i dot stone at intel dot com @ 2007-06-07  0:22 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From joshua dot i dot stone at intel dot com  2007-06-07 00:22 -------
How about also an alternative that allows an arbitrary delimiter?  Seems like
people would often want to output a list of things tab- or comma-delimited.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4591

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug translator/4591] println function
  2007-06-04 16:14 [Bug translator/4591] New: println function fche at redhat dot com
  2007-06-07  0:22 ` [Bug translator/4591] " joshua dot i dot stone at intel dot com
@ 2007-08-14  4:59 ` joshua dot i dot stone at intel dot com
  2007-08-17  2:25 ` joshua dot i dot stone at intel dot com
  2 siblings, 0 replies; 4+ messages in thread
From: joshua dot i dot stone at intel dot com @ 2007-08-14  4:59 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From joshua dot i dot stone at intel dot com  2007-08-13 23:47 -------
I think it would be easy to generalize this into a set of print variants that
should cover just about anyone.  I propose adding two new suffix variants to
print-like statements: 'd' for delimited, and 'ln' (or perhaps just 'n') for
including a newline.  With 'd', the first parameter must be a string literal
that will delimit the rest of the arguments.  With 'ln', a newline is appended.
 Bare print() and sprint() would be extended to allow multiple arguments, which
just get printed one-after-the-other.

So the complete list of print statements would be:
  print, sprint, printf, sprintf, printd, sprintd,
  println, sprintln, printdln, sprintdln

We have a special case of print(@hist_*) -- I'll leave that as-is.

Any comments?  If there are no objections, I will implement this...

Josh

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4591

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug translator/4591] println function
  2007-06-04 16:14 [Bug translator/4591] New: println function fche at redhat dot com
  2007-06-07  0:22 ` [Bug translator/4591] " joshua dot i dot stone at intel dot com
  2007-08-14  4:59 ` joshua dot i dot stone at intel dot com
@ 2007-08-17  2:25 ` joshua dot i dot stone at intel dot com
  2 siblings, 0 replies; 4+ messages in thread
From: joshua dot i dot stone at intel dot com @ 2007-08-17  2:25 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From joshua dot i dot stone at intel dot com  2007-08-17 01:57 -------
(In reply to comment #2)
> So the complete list of print statements would be:
>   print, sprint, printf, sprintf, printd, sprintd,
>   println, sprintln, printdln, sprintdln

I have committed changes to implement all of these.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=4591

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-17  1:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-04 16:14 [Bug translator/4591] New: println function fche at redhat dot com
2007-06-07  0:22 ` [Bug translator/4591] " joshua dot i dot stone at intel dot com
2007-08-14  4:59 ` joshua dot i dot stone at intel dot com
2007-08-17  2:25 ` joshua dot i dot stone at intel dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).