On Thu, 2012-03-29 at 18:54 +0200, Ludovic Brenta wrote: > Svante Signell <[email protected]> writes: > > Another stupid question: How is the system parameter ENOMEM > > communicated from s-osinte-gnu.ads to s-taprop-gnu.adb? > > ENOMEM is not a variable, it is a constant, sometimes defined as a C > macro in libc, in which case it cannot be imported.
I know that ENOMEM is a constant, defined in a header file, but did not know that it cannot be imported. Ada does not seem to have the #include <file.h> directive, like C does. > In GNAT it is > (re-)defined as a constant by the various incarnations of the package > System.OS_Interface, the spec of which is one of the files > s-osinte-*.ads. I've updated that file for GNU/Hurd now! > > There is no with statement in the .adb file and adding with > > System.OS_Interface; use System.OS_Interface; > > The with statement is in the spec of the package > System.Task_Primitives.Operations, in s-taprop.ads, and the use > statement is in the body, in the appropriate s-taprop-*.adb. OK, things getting clearer and clearer, but still foggy ;) Any easy way to print e.g. the ENOMEM constants and the Results variable (for debugging purposes)? Printing seems to be cumbersome in ADA, as some other languages... > You should really learn how Ada packages work :) It's on the TODO list, TTT (Things Take Time) :-) Looks like you have to scan several files to get an idea about package structures. One thing, still puzzling: .adb vs .ads files, what controls which ones does get compiled? Anyway, thanks for your replies! -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]
