Added upstream from http://ftp.icm.edu.pl/pub/loglan/
[loglan.git] / loglan96 / loglan93 / tstobj.cc
1 /**********************************
2  * test of the location class     *
3  **********************************/
4
5 #include <iostream.h>
6 #include "Objects.h"
7
8 Location a,*b,c(4,4,6,8);
9
10 main()
11 {
12   cout << "Location of a " << a << ".\n" << "Location of c " << c << ".\n";
13   b = new Location ( 5,5 );
14   cout << "After creation, Location of b is " << *b << ".\n";
15   b->SetEnd(9,2);
16   cout << "After modification, Location of b is " << *b << ".\n";
17   a.Move(15,3);
18   a.Tab( 40 );
19   cout << "After modification of A , and tabbing, Location of a is " << a << ".\n";
20   a.Cr();
21   cout << "Then Location of a is after Cr :"<< a << ".\n";
22   a.Select( 15 );
23   cout << "Location of a after Select(15) is " << a << ".\n";
24   a.Select( 2 );
25   cout << "Location of a after Select(15) is " << a << ".\n";
26   cout << "After all of this the location of a + c is " << (a + c) << ".\n";
27 }