Forum > General

default method for objects

<< < (2/2)

Thaddy:
Well I just demo'd that, isn't it? You should look at how I implemented the class operator Initialize.
That is fully automatic. So yes, it is possible. Also look at the two class operators.
  b := f;
  writeln(b);

This is exactly what you asked. b = byte and f = Tfoo.

Try to understand my - complete - example. It works as intended and with the correct syntax.

speter:
Yes! Thanks Thaddy.

cheers
S.

Thaddy:
I would also add the two comparison operators =
I leave that as an exercise for you.  :D

Navigation

[0] Message Index

[*] Previous page

Go to full version