User Manual table of contents
 INDEX | GETTING STARTED | TASKS | LANGUAGE | LIBRARY | SYSTEM | SAMPLES

Release Notes for Version 1.0d71


Home
Products
*Tour
*Manual
Corporate
Support
Search



!
Quick Reference
Object Types
System Properties
System Methods
Command-Line
Binary Operators





Teach FileNames How To Compare Themselves
Summary

We've fixed a bug that caused comparing two FileName objects that named the same file to erroneously report inequality.

Background

The trouble stemmed from the fact that the default interpretation of '==' (is-equal-to) for most kinds of objects checks to see if the objects being compared are actually both the same object. In cases where certain types of objects have a more obvious interpretation of equality, pop!talk overrides the standard meaning. For example, if you've got two Strings:

&(string1 = "hello");
&(string2 = "goodbye");

and you compare them:

<if &(string1 == string2);>
They are equal
</if>
<if &(string1 != string2);>
They are not equal
</if>

You'd expect to get They are not equal. On the other hand, when you change the Strings to:

&(string1 = "hello");
&(string2 = "hello");

you expect to get They are equal, even though you're actually dealing with two different objects.

To give users a natural experience, we override what '==' means for certain kinds of objects (Strings, in this example). We do this for some other kinds of objects (TimeStamps, for example). Unfortunately, we forgot to do this for FileName objects. This has now been corrected.

What's been described here also applies to the != (not-equal-to) operator.

 


powered by pop!site Copyright 1995-1997. Pragmatica, Inc. All Rights reserved.
Pragmatica, pop!site and pop!talk are trademarks of Pragmatica, Inc.
Modified: 19 May, 1997 16:32:24

Page Feedback
Webmaster Contact