% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % File: if_else.dtr % % Purpose: example of IF .. ELSE .. construct as DATR sugar % % Author: David Weir, 14th July 1994 % % Email: davidw@cogs.sussex.ac.uk % % Address: COGS, Sussex University, Brighton BN1 9QH, UK % % Related files: case3.dtr % % Version: 1.00 % % % % Copyright (c) University of Sussex 1994. All rights reserved. % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % # atom T F THEN ELSE. EQ: <> == F <$X $X> == T. IF: == $X == $Y. Cat: == moggie == IF: " birman> THEN long_hair ELSE IF: " sphinx> THEN no_hair ELSE short_hair>>. Garfield: <> == Cat. Felix: <> == Cat == birman. Kojak: <> == Cat == sphinx. % % % % % % % % % % % % % % % % % % % % % Three theorems: % % % % Garfield: = short_hair. % % Felix: = long_hair. % % Kojak: = no_hair. % % % % % % % % % % % % % % % % % % % % % # show . # hide Cat IF EQ. % The next line is the Revision Control System Id: do not delete it. % $Id: archive.dtr,v 1.1 1997/04/09 20:40:33 root Exp $