unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* printf formatting in Perl
@ 2006-09-08 19:51 Steve Bickerton
  0 siblings, 0 replies; only message in thread
From: Steve Bickerton @ 2006-09-08 19:51 UTC (permalink / raw)


Hi All,

	I'm afraid I'm being a bit picky here, but I'd like to find a way to 
change the indentation used by emacs for the printf command in a Perl 
script.  When I use a printf statement which is longer than the line 
length, I'd prefer to put it on several lines, but subsequent lines 
don't come out indented with respect to the printf.

An example:

Example 1 (doesn't indent subsequent lines):

     printf STDOUT "This string fills a lot of the line: %.3f %.3f\n",
     $var1, $var2;


I've found a work-around by concatenating part of the string onto the 
subsequent line, like this:

Example 2 (does indent subsequent lines):

     printf STDOUT "This string fills a lot of the line: %.3f %.3f".
	"\n", $var1, $var2;


The indentation in example 2 is what I'm looking for, but without 
needing to concatenate.  Suggestions?

regards,
steve

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-08 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-08 19:51 printf formatting in Perl Steve Bickerton

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).