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

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!mcsun!sunic!nobeltech!dawe
  3. From: dawe@nobeltech.se (Daniel Wengelin)
  4. Subject: Re: Outputting quote marks
  5. Message-ID: <1992Nov23.195807.26767@nobeltech.se>
  6. Organization: NobelTech AB
  7. References: <By13E7.4q5@plato.ds.boeing.com> <1992Nov22.124601.4138@nobeltech.se> <1992Nov22.170456@lglsun.epfl.ch>
  8. Date: Mon, 23 Nov 1992 19:58:07 GMT
  9. Lines: 58
  10.  
  11. In article <1992Nov22.170456@lglsun.epfl.ch> nebbe@lglsun.epfl.ch (Robb Nebbe) writes:
  12. >In article <1992Nov22.124601.4138@nobeltech.se>, dawe@nobeltech.se (Daniel Wengelin) writes:
  13. >|> In article <By13E7.4q5@plato.ds.boeing.com> rosen@plato.ds.boeing.com (Robert Rosen) writes:
  14. >|> >I need to use Text_IO to output a string consisting of three
  15. >|> >consecutive quote marks (""").  How can I do it?  Trying 
  16. >|> >
  17. >|> >  Text_IO.Put_Line (""""");
  18. >|> >
  19. >|> >produces a compilation error.
  20. >|> >
  21. >|> >Bob Rosen
  22. >|> >Boeing
  23. >|> >rosen@goofy.ds.boeing.com
  24. >|> >206-773-2852
  25. >|> 
  26. >|> 
  27. >|> Try Put_Line(%"""%); It works fine on my Rat, and is much more 
  28. >|> readable than a large number of quotation characters (LRM 2.10).
  29. >
  30. >If you read LRM 2.10 a little closer you will see that %"""% should be
  31. >illegal for any Ada compiler LRM 2.10(4) However you are right about it
  32. >being much more readable and it probably should be legal.
  33. >
  34. >Robb Nebbe                     nebbe@lglsun.epfl.ch
  35.  
  36.  
  37.  
  38.  
  39. How true, how true. I am beginning to realize that the Rational is
  40. sometimes more user-friendly than I deserve, which may definitely
  41. cause these results when replying in a "only read LRM if test fails"-
  42. mode.
  43.  
  44. The Rational behaviour does however raise a question. What the Rat
  45. does is to reformat the (%"""%) into the valid ("""""") (hope I got
  46. that one right) automatically. I never saw it happen when I tried
  47. it out.
  48.  
  49. Is this a strictly legal behaviour of an APSE? If I enter
  50. PUT(%"""%); and compile, I would expect LRM2.10(4) to
  51. require an error, but instead the APSE silently changes
  52. my source to something legal. Any LRM-lawyer has a comment?
  53.  
  54.  
  55.                      Daniel
  56.  
  57.  
  58. ----------------------------------------------------------------
  59. !    with Standard_Disclaimer;                                 !
  60. ----------------------------------------------------------------
  61. !    Daniel Wengelin               ! E-mail: dawe@nobeltech.se !
  62. !    Systems analysis and design   ! Phone : +46 8 58084000    !
  63. !    NobelTech Systems             ! Fax   : +46 8 58081542    !
  64. !    Naval Systems Division        ! Mail  : S-17588 Jarfalla  !
  65. !                                  !         SWEDEN            !
  66. ----------------------------------------------------------------
  67. ! NobelTech: Winner of the -92 Ada Industry Leadership Award   !
  68. ----------------------------------------------------------------
  69.