head	1.3;
access;
symbols;
locks; strict;
comment	@// @;


1.3
date	94.10.11.00.27.28;	author rjj;	state Exp;
branches;
next	1.2;

1.2
date	94.09.02.01.47.47;	author rjj;	state Exp;
branches;
next	1.1;

1.1
date	94.09.01.00.12.56;	author rjj;	state Exp;
branches;
next	;


desc
@Placing under RCS.  This should be the source corresponding to UM 1.0
@


1.3
log
@Modified to use 'return 0;' rather than 'exit(0);'.
@
text
@// point_example.03.c       Point operators

#include "IntPoint.h"

int main()
{
    IA_Point<int>
	ipoint1(0, 0, 0),  //   initialized to <0 0 0>
	ipoint2,                   // uninitialized point
	ipoint3(1, 2, 3);          //   initialized to <1 2 3>
    
    // Subscripting
    ipoint1[0] = 1;	// new value is <1 0 0>
    ipoint1[2] = 2;	// new value is <1 0 2>

    ipoint2 = ipoint1 + ipoint3;
    // ipoint2 has value <2 2 5>

    // Here we treat the constructor as a function which returns
    //   a new point <0 0 1>, which is subtracted from ipoint2
    ipoint2 -= IA_Point<int>(0, 0, 1);	// new value is <2 2 4>

    cout << "ipoint2 has value " << ipoint2++ << "\n";
    // Prints <2 2 4>, new value of ipoint is <3 3 5>

    cout << "ipoint2 has value " << ipoint2 << "\n";

    return 0;
}
@


1.2
log
@Modified to be iac++ v2.0 compliant.
@
text
@a2 1
#include <stdlib.h>
d28 1
a28 1
    exit( 0 );
@


1.1
log
@Initial revision
@
text
@a0 2
// Emacs: -*- C++ -*-

d3 1
d6 1
a6 1
main()
d22 1
a22 1
    ipoint2 -= IA_IntPoint(0, 0, 1);	// new value is <2 2 4>
d28 2
@
