Beginners Q: Comparing objects in ST/80 R4 
Author Message
 Beginners Q: Comparing objects in ST/80 R4

I have just started learning ParcPlace ST/80 R4, and I've come accross a
peculiar behavior of Date and Time classes I am not able to find
logical. What puzzles me is how instances of Date are compared with

Date today < 'hi'  ---> message not understood
i.e. 'hi' doesn't understand year message (< method is implemented in
Date class)

Date today > 'hi'  ---> false

> message is implemented by Magnitude. In effect it is implemented as 'hi' < Date today, and < method is used as implemented by String. Then a Date instance is sent size message and returns 0.

In Integer class for example the size method is overwritten so that when
it is invoked on anInteger it returns an error message:
1 > 'hi' ---> This message is not appropriate for this object.

My question basically is: Why is the size message re-implemented in Date
class the same way it is done for example in Integer? Is this an
omission or is there some deaper logic behind it? Why should an object
like date return size=0?

Thanks for any help.
Martin Ligr
Institut fuer Biochemie
Universitaet Stuttgart
Pfaffenwaldring 55
D-70569 Stuttgart

phone:  +49-(0711)-685-4383
fax:    +49-(0711)-685-4392
home:   +49-(07151)-905-901

Sat, 13 Feb 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. ST-80 R4.1 ColorPicker

2. BOS for ST/80 R4.0

3. UDP on ST-80 r4

4. UPpostInterrupt() in ST-80 R4

5. Tetris (ST-80 R4)

6. Portable pixmaps in ST-80 R4

7. Bug in PP ST-80 R4, and a fix

8. ST-80 R4 Goodie

9. ST-80/OS/2 vs. ST-80/Windows

10. Resize ST-80 Browser Panes (was Cognitive Overload with ST-80)

11. Exchange ST-80/Win v2.5 for ST-80/OS2 v2.5

12. Distributing Objects in Smalltalk-80 r4.0


Powered by phpBB® Forum Software