Basic HTML version of Foils prepared March 30 97

Foil 5 Scalar Data II -- Single Quoted Strings (Chapter 2 of Llama Book)

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


1 There are two types of strings defined by a stream of characters inside either single quotes ' and ' or double quotes " and "
2 Single quoted strings are the simplest but probably least often used.
3 Inside such strings ALL characters including newlines are treated as they look except that ' must be represented as \' and \ as \\.
  • \n does NOT represent a newline.
  • Example: 'don\'t' is the 5 character don't
4 As in C ALL strings are stored as zero byte terminated byte streams so that
  • '' and "" are both stored internally as one byte 00 (octal zero)

in Table To:


© 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