comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: __FILE__ and __LINE__
Date: 1997/04/08
Date: 1997-04-08T00:00:00+00:00	[thread overview]
Message-ID: <dewar.860508578@merv> (raw)
In-Reply-To: 5id07f$3ap@nlrgup.nlr.nl


i<<    You're right. Attributes are preferred (also from a user's point of
view). I've thought about Attributes for this job, but I couldn't find
appropriate Attributes. Furhermore, I couldn't figure out where they
should be Attributes of.
>>

Actually, thinking about this more, I prefer a standard package to the
use of attributes:

  package Compile_Time_Info is
     function Time_Compiled return Calendar.Time;
     function Line_Number return Natural;
     function Source_File_Name return String;

     pragma Import (Intrinsic, Time_Compiled);
     pragma Import (Intrinsic, Line_Number);
     pragma Import (Intrinsic, Source_File_Name);

     etc ..
  end Compile_Time_Info;

This of course requrires compiler assistance (any solution to this problem
does), but this seems the cleanest approach. It would not be hard to 
implement in GNAT, but there are no plans to do so currently





  reply	other threads:[~1997-04-08  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-07  0:00 __FILE__ and __LINE__ Carl G.M. Welman
1997-04-07  0:00 ` David C. Hoos, Sr.
1997-04-07  0:00 ` Robert Dewar
1997-04-08  0:00   ` Carl G.M. Welman
1997-04-08  0:00     ` Robert Dewar [this message]
1997-04-09  0:00   ` Fergus Henderson
replies disabled

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