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.48;	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.05.c        Point member functions

#include "IntPoint.h"
#include "DblPoint.h"

int main()
{
    IA_Point<int> ipoint1(1,2,3), ipoint2;

    // dim() is a member function, so its syntax used the dot notation
    cout << "ipoint1 has value " << ipoint1 << "\n";
    cout << ipoint1.dim() << "\n";	// dimensionality of ipoint1 is 3

    // enorm() is not member function, so it uses normal C syntax
    cout << enorm( ipoint1 ) << "\n";
    // enorm in this case is sqrt(1*1 + 2*2 + 3*3 ) ~ 3.74166

    // derange() is a not member function
    ipoint2 = derange(ipoint1,2,1,2,0);
    // ipoint2 is now a 4D point with coordinate values
    // ipoint[2], ipoint[1], ipoint[2], ipoint[0]

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

    // concat() is a friend function, and hence does *NOT*
    //    use dot notation
    // concat(ipoint1,ipoint2) == <1 2 3 3 2 3 1>
    cout << "concat(ipoint1,ipoint2) has value "
	 << concat(ipoint1,ipoint2)
	 << "\n";

    return 0;
}
@


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


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

d3 1
d5 1
a5 1
#include "FloatPoint.h"
d7 1
a7 1
main()
d15 2
a16 2
    // enorm() is a member function
    cout << ipoint1.enorm() << "\n";
d19 2
a20 2
    // derange() is a member function
    ipoint2 = ipoint1.derange(2,1,2,0);
d32 2
@
