comp.lang.ada
 help / color / mirror / Atom feed
* Emacs
@ 1988-10-21 21:45 Fred Hosch
  0 siblings, 0 replies; 5+ messages in thread
From: Fred Hosch @ 1988-10-21 21:45 UTC (permalink / raw)


Does anyone have an Emacs mode implementation for Ada that they
are willing to share?

	Fred Hosch
	fred@cs.utexas.edu

^ permalink raw reply	[flat|nested] 5+ messages in thread
* emacs
@ 1998-01-26  0:00 Nick Roberts
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Roberts @ 1998-01-26  0:00 UTC (permalink / raw)



I always liked "escape meta alt control shift" :-}
Nick Roberts
Croydon, UK





^ permalink raw reply	[flat|nested] 5+ messages in thread
* Allocation question
@ 2009-05-11 10:23 Olivier Scalbert
  2009-05-11 10:51 ` Use aggregates (Was: Allocation question) Jacob Sparre Andersen
  0 siblings, 1 reply; 5+ messages in thread
From: Olivier Scalbert @ 2009-05-11 10:23 UTC (permalink / raw)


Hello,

I have write a small package:

---------------------------------------------------
-- ads
---------------------------------------------------
package Image is

     type Color_T is record
         Red:   Integer;
         Green: Integer;
         Blue:  Integer;
     end record;

     type Image_T is array(Positive range <>, Positive range <>) of Color_T;

     procedure Fill(Image: in out Image_T; Color: Color_T);

end Image;

---------------------------------------------------
-- adb
---------------------------------------------------
package body Image is

procedure Fill(Image: in out Image_T; Color: Color_T) is
begin
      for x in Image'range(1) loop
          for y in Image'range(2) loop
              Image(x,y) := Color;
          end loop;
      end loop;
end Fill;

end Image;


---------------------------------------------------
-- test
---------------------------------------------------
with Image;
use Image;

procedure Test_Image is
     Image : Image_T(1..100, 1..100);
     FillColor : constant Color_T := (0, 0, 0);
begin
     Fill(Image, FillColor);
end Test_Image;


This program seems to work.
However when I increase the size of Image, I get a Segmentation fault.

Should I need to play with access type and allocation stuff ?

Thanks,

Olivier





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

end of thread, other threads:[~2009-05-12  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1988-10-21 21:45 Emacs Fred Hosch
  -- strict thread matches above, loose matches on Subject: below --
1998-01-26  0:00 emacs Nick Roberts
2009-05-11 10:23 Allocation question Olivier Scalbert
2009-05-11 10:51 ` Use aggregates (Was: Allocation question) Jacob Sparre Andersen
2009-05-12  9:13   ` Emacs Stephen Leake
2009-05-12  9:38     ` Emacs Ludovic Brenta
2009-05-12  9:46     ` Emacs Olivier Scalbert

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