comp.lang.ada
 help / color / mirror / Atom feed
* Meridian and ADA
@ 1993-06-03  4:01 munnari.oz.au!newshost.anu.edu.au!csc.canberra.edu.au!birch!tp913382
  0 siblings, 0 replies; 4+ messages in thread
From: munnari.oz.au!newshost.anu.edu.au!csc.canberra.edu.au!birch!tp913382 @ 1993-06-03  4:01 UTC (permalink / raw)


This thing is driving me crazy! I've compiled a couple of thousand
lines, with no probs, linked them no probs, but when i try to run the
prog, the vcomputer hangs.
I've developed about 6 packages which have been tested thoroughly...
not even a Text_IO.put_Line("First line"); 
at the start, right after the begin in the main running procedure get's
outputted... I think it mayt be the compiler... Meridian 1.4. something
Is there another PD one i can use? (not that meridian's PD I'm using it
in the uni) can someone help me please? I'm desperate!

      - damian

                email would be cool :)



      thanks in advance...

--
tp913382@maple.canberra.edu.au
Damian J. K. Haslam                    Here's my quote:
Nonconformist uni student              "Life wasn't meant to be easy"
Computer Engineering                   Now they tell me..

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Meridian and ADA
@ 1993-06-03 12:56 Robert Dewar
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Dewar @ 1993-06-03 12:56 UTC (permalink / raw)


Damian, have you contacted Meridian technical support. That seems the first
place to go with such a problem, and it is always interesting to here from
people what their experiences with technical support is. Of course no vendor
can spend time finding bugs in arbitrary user programs, but they may be
able to help point you in the direction of how to use tools such as debuggers
to track down your problems.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Meridian and ADA
@ 1993-06-03 20:31 concert!news-feed-1.peachnet.edu!umn.edu!email.sp.paramax.com!not-for-mai
  0 siblings, 0 replies; 4+ messages in thread
From: concert!news-feed-1.peachnet.edu!umn.edu!email.sp.paramax.com!not-for-mai @ 1993-06-03 20:31 UTC (permalink / raw)


Generally speaking, if the first line of the main program (Text_IO.put_Line("Fi
rst line");) is not being reached, the problem you are encountering is an excep
tion raised during elaboration.

How to procede:
1. Check all of your declarations, if you ar initializing some variable
   to a value not contained in its type a constraint error will occur.
   Make sure all array aggregate initializations have the correct
   number of elements.
2. You may need to put in pragma elaborates to control the elaboration order
   of your code.  Some compilers have trouble determining the order
   which your packages need to be elaborated, and will pick the wrong
   order.  If a package uses a user definded operation to initialize
   data in the package body, it is generally a good idea to use pragma
   elaborate.  If part of your elaboration contains code which attempts
   to call a task entry, you must make sure that the task is elaborated
   before the call is attempted.  If I have initialization that needs
   to call a task, I will write an initialization procedure that can be
   called once the entire program has been elaborated.
3. To possibly determine which package the elaboration error is occuring in
   you may be able to put Text_IO.Put_Lines in the begin..end of the package 
   body.  Remember, the executable portion of the body is executed after
   all of the packages variables, types. procedures, functions, etc are 
   elaborated.
4. If you know what package is failing to elaborate, but do not know
   what declaration, you can write a function that outputs text to trace
   how far you are getting.  i.e.
   
   function Trace(Text:String) return integer is
   begin
     Text_IO.Put_Line(Text);
     return 1;
   end Trace;
   
   Scatter dummy integer initializations through your package body
   and you should be able to determine which declataion is giving you 
   problems.

Of all of the problems that I have encountered using ada, the hardest
to find are exceptions raised during elaboration.  Some compilers do
give you very good support for discovering these problems, others
don't.  One thing I have learned is if your compiler outputs a warning
indicating a constraint error will be raised during a units
elaboration, don't ignore it.

Good Luck, Wayne Donaho.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Meridian and ADA
@ 1993-06-03 22:25 dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!europa.eng.g
  0 siblings, 0 replies; 4+ messages in thread
From: dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!europa.eng.g @ 1993-06-03 22:25 UTC (permalink / raw)


wayne@hobbes.sp.paramax.com (Wayne E. Donaho) has good suggestions for
debugging exceptions raised during elaboration.

Another suggestion is to compile using the debugger.  Then, before
execution execute
    excbreak(true)
to cause the debugger to report all exceptions as soon as they are
raised.

My experience (mostly good) with Meridian is on the Mac; I suspect the
same debugger command will work on the PC.  Consult the manual.

Art Evans
----------------------------------------------
Arthur Evans, Jr, PhD           Ada Consultant
461 Fairview Road
Pittsburgh PA  15238-1933
412-963-0839
ae@sei.cmu.edu

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1993-06-03 22:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-06-03 12:56 Meridian and ADA Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1993-06-03 22:25 dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!europa.eng.g
1993-06-03 20:31 concert!news-feed-1.peachnet.edu!umn.edu!email.sp.paramax.com!not-for-mai
1993-06-03  4:01 munnari.oz.au!newshost.anu.edu.au!csc.canberra.edu.au!birch!tp913382

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox