home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / ada / 3326 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1.0 KB  |  38 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!noc.near.net!inmet!spock!stt
  3. From: stt@spock.camb.inmet.com (Tucker Taft)
  4. Subject: Re: Outputting quote marks
  5. Message-ID: <1992Nov21.033630.6060@inmet.camb.inmet.com>
  6. Sender: news@inmet.camb.inmet.com
  7. Nntp-Posting-Host: spock
  8. Organization: Intermetrics Inc, Cambridge MA
  9. References: <By13E7.4q5@plato.ds.boeing.com>
  10. Date: Sat, 21 Nov 1992 03:36:30 GMT
  11. Lines: 25
  12.  
  13. In article <By13E7.4q5@plato.ds.boeing.com> 
  14.   rosen@plato.ds.boeing.com (Robert Rosen) writes:
  15.  
  16. >I need to use Text_IO to output a string consisting of three
  17. >consecutive quote marks (""").  How can I do it?  Trying 
  18. >
  19. >  Text_IO.Put_Line (""""");
  20. >
  21. >produces a compilation error.
  22.  
  23. Try:
  24.    Text_IO.Put_Line("""""""");  -- That's 2 + 3*2 = 8 quote marks
  25.  
  26. Inside a string, two consecutive quote marks represent one quote
  27. mark.  Hence, you should never have an odd number of quote
  28. marks in a string.  See RM 2.6(3).
  29.  
  30. >Bob Rosen
  31. >Boeing
  32. >rosen@goofy.ds.boeing.com
  33. >206-773-2852
  34.  
  35. S. Tucker Taft  stt@inmet.com
  36. Intermetrics, Inc.
  37. Cambridge, MA  02138
  38.