How do i find a list of the methods Object implements, or maybe just locate the 'write' method?

dan dan.hitt at gmail.com
Tue Nov 7 21:25:00 UTC 2017


I was writing some code and added a line like
      x.write;
expecting to fill it in later.

I forgot to actually write a function write, but it compiled 
anyway, and some testing shows that if you write
       auto o = new Object;
       o.write;
then this compiles just fine.  (The 'write' method, whatever it 
is, does not return a value, as 'auto y = o.write;' will not 
compile.)

So that presumably means that i'm about to override 'write' (when 
i finish up my class), but i have no idea what the original 
'write' does.

I looked in my distribution's object.d (debian stretch, gdc, in
/usr/lib/gcc/x86_64-linux-gnu/6/include/d/object.d) but i don't 
see anything that looks like a write method there.

I tried to do a net search, but 'write' is a very common word.

I then thought that i should just get an authoritative list of 
Object's methods, and hope something was documented there, but my 
searching for a list of for this also failed.

So i'd be grateful if somebody could tell me where i can find 
documentation on 'write' and/or what it means for an Object to 
write, and/or where i can see just what methods Object 
implements, and what those methods do.

Thanks in advance for any clues, or a pointer to page 1 of the 
manual if it's there and i'm just being dense.

dan


More information about the Digitalmars-d-learn mailing list