Right. The compiler knows what the line number is (at least if there's no preprocessor in the way). It can return that from a pseudo- function. Same for class, method, etc.
On Aug 2, 10:03 pm, Bob Kerns <r...@acm.org> wrote: > Note that you don't need a preprocessor to do this! Just a bit of > language support. > > On Aug 2, 8:01 pm, Bob Kerns <r...@acm.org> wrote: > > > Yes, I've seen a few cases like this. There are ways to cache the > > runtime call, which can be a bit expensive, but they rely a bit much > > on convention and are a bit more verbose than you'd like. > > > On Aug 2, 7:02 pm, DanH <danhi...@ieee.org> wrote: > > > > Lots of times it would be nice for logging. Sometimes you'd like to > > > store an "I was here" indicator in a structure when you modify it. > > > Yes, there are alternatives, but not as nice. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en