Greetings,
I'm reading a text file line-by-line, and am hoping to use pattern matching
to filter out lines. I'm finding, however, that the pattern matching only
works if the pattern contains literals rather than variables, and was hoping
to find out whether I've not correctly grasped Oz pattern matching or
whether perhaps this is a bug [Oz 1.3.1 on Win32].
Note the following snippet:
LINE = {FILE getS($)}
...
case LINE of false then
...
elseof Delimiter|_
...
else
...
The 'elseof' block is meant to filter out lines that begin with the value
bound to 'Delimiter', but:
* If 'Delimiter' [as shown above] is used the pattern matching does
not work as expected; instead, any non-false value is matched
* If a literal is used, such as:
...
elseof 60|_
...
or perhaps:
...
elseof &>|_
...
the pattern matching works as expected
Can anyone shed any light on this ?
Cheers,
Anthony Borla
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users