comp.lang.ada
 help / color / mirror / Atom feed
* how to create a record
@ 2006-11-03  3:14 markww
  2006-11-03  4:48 ` Jeffrey Creem
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: markww @ 2006-11-03  3:14 UTC (permalink / raw)


Hi,

How can I define a record or a class to this source file and create an
instance of it?

with Ada.Text_IO;

    type struct_device is
        record
           major_number : Integer          := 0;
           minor_number : Integer          := 0;
        end record;

procedure Ada_LinkedList is
begin
   Ada.Text_IO.Put_Line("Hello, world!");
   Ada.Text_IO.Put_Line("just terrible!");
end Ada_LinkedList;


I tried creating a record like in the above example, and compiling with
gnatmake but get the error:

C:\>gnatmake C:\Ada_LinkedList.adb
gcc -c -IC:\ -I- C:\ada_linkedlist.adb
ada_linkedlist.adb:4:05: compilation unit expected
gnatmake: "C:\ada_linkedlist.adb" compilation error

Thanks




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

end of thread, other threads:[~2006-11-04  3:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-03  3:14 how to create a record markww
2006-11-03  4:48 ` Jeffrey Creem
2006-11-03  5:29   ` Jeffrey R. Carter
2006-11-03  7:51   ` Maciej Sobczak
2006-11-03  5:00 ` jimmaureenrogers
2006-11-03  5:19 ` Jeffrey R. Carter
2006-11-03 11:51 ` Martin Krischik
2006-11-03 16:56 ` Pascal Obry
2006-11-04  3:09   ` Randy Brukardt

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