home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.19 / text0022.txt < prev    next >
Encoding:
Internet Message Format  |  1990-05-17  |  1.1 KB

  1. From: Maarten Litmaath <uunet!cs.vu.nl!maart>
  2.  
  3. In article <589@longway.TIC.COM>,
  4.     karl@IMA.IMA.ISC.COM (Karl Heuer) writes:
  5. )...
  6. )Proposal: Reserve $\ (dollar-backslash) as a new entity that begins a C-like
  7. )escape, so we would have $\a $\b $\t $\n $\v $\f $\r, octal escapes like
  8. )$\177, and hex escapes like $\x7F.
  9. )
  10. )Alternative proposal (from a suggestion by Eric Gisin, eric@mks.com): make a
  11. )new string quoting mechanism, $"...", which is just like "..." except that, in
  12. )addition to the four current backslash escapes \$ \` \" \\ that are permitted
  13. )inside double quotes, all the C-like escapes \a etc. would be recognized.
  14.  
  15. Good idea!
  16. But why not allow *both* syntaxes?  The first would be a simple form of
  17. the second:
  18.  
  19.     $\a
  20. equals
  21.     $"\a"
  22.  
  23. ...just like:
  24.  
  25.     $foo
  26. and
  27.     ${foo}
  28.  
  29. When you only want a single control character, you'd use the first form,
  30. when you want some escape codes in a row (possibly containing `normal'
  31. characters as well), you'd use the second form.
  32. --
  33.  1) Will 4.5BSD have wait5()?         |Maarten Litmaath @ VU Amsterdam:
  34.  2) Sleep(3) should be sleep(2) again.|maart@cs.vu.nl, uunet!mcsun!botter!maart
  35.  
  36. Volume-Number: Volume 19, Number 23
  37.  
  38.