home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / ada / 2541 < prev    next >
Encoding:
Text File  |  1992-09-07  |  1.8 KB  |  54 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!munnari.oz.au!manuel!csc.canberra.edu.au!ash!tp923021
  3. From: tp923021@ash.canberra.edu.au (Ben Elliston)
  4. Subject: Case errors
  5. Message-ID: <tp923021.715674752@ash>
  6. Sender: news@csc.canberra.edu.au
  7. Organization: Info Sci & Eng, University of Canberra, AUSTRALIA
  8. Date:  5 Sep 92 06:32:32 GMT
  9. Lines: 43
  10.  
  11. Hiya.
  12.  
  13. I'm trying to compile a program using Meridian ACE and it's generating
  14. an error which is a little hard to work out based on its description:
  15.  
  16. "Incomplete case in middle of range"
  17.  
  18. The portion of code generating this error is:
  19.  
  20. CASE Symbol IS
  21.   WHEN "(" | "[" | "{" => Push(Symbol,S);  -- Push the symbol onto stack
  22.   WHEN ")" | "]" | "}" => 
  23.     IF Empty(S) THEN -- The stack is empty?
  24.       Valid := False;
  25.     ELSIF Match(Top(S),Symbol) THEN  -- The closing symbol matches
  26.                                      -- the opening symbol on the stack
  27.       Pop(S);
  28.     ELSE
  29.       Valid := False;
  30.     END IF;
  31.   Text_IO.Get(Item => Symbol);
  32. END CASE;
  33.  
  34. .. the package using the Pop, Push and Match, etc. functions compiles
  35. okay.
  36.  
  37. If anything here is noticably wrong, I'd appreciate hearing about it!
  38. :-)
  39.  
  40. Many thanks.
  41.  
  42. Cheers,
  43. %Ben%
  44. ------------------------------------------------------------------------------
  45. Ben Elliston                                           | This message
  46. Bachelor of Engineering (Computer Engineering)         | brought to you
  47. University of Canberra                                 | by the machine
  48. Internet: tp923021@fir.canberra.edu.au                 | that goes
  49. FidoNet:  3:620/262                                    | 'ping'!
  50. -------------------------------------------------------+----------------------
  51. Some people make champagne out of water.
  52. ------------------------------------------------------------------------------
  53.  
  54.