Basic HTML version of Foils prepared March 30 97

Foil 67 Multiline Format Fields and Expressions (Chapter 11 of Llama Book)

From PERL4 Tutorial for CPS616 Computational Science for Information Age Course CPS616 -- February 1995. by Geoffrey C. Fox


The Multiline text field designator
  • @* will print a stream of characters with newlines output wherever they are in specified variable
Note here and in other variable specifications you can replace scalar variable by any expression returning a scalar variable. This could involve calling an optimized subroutine indicated by &subname
  • here one can use sprintf(formatstring,value1,value2,..) which returns formatted string using format familiar from C to output numeric data in specialized fashion
  • $>>>>>>>>
  • &sprintf("%8.2f",$val)
  • .
  • is equivalent to
  • @#####.##
  • $val
  • .



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Sep 6 1997