Re: data structure definition?
- To: mathgroup at smc.vnet.net
- Subject: [mg16335] Re: [mg16276] data structure definition?
- From: Jurgen Tischer <jtischer at col2.telecom.com.co>
- Date: Sun, 7 Mar 1999 01:05:52 -0500
- Organization: Universidad del Valle
- References: <199903050541.AAA13756@smc.vnet.net.>
- Sender: owner-wri-mathgroup at wolfram.com
Antoine, overloading + is done with point[a_,b_]+point[c_,d_]^:=point[a+c,b+d] (check UpSetDelayed in Help). I don't understand what you mean by output operator. Jurgen schatzi wrote: > > Hello, > > I am stuck with the following: > > I would like to define a data structure, say point[x,y], to be able to > write p = point[1,0]; q = point[-1,2]; > > Then overloading the + operator would be nice, as well as the output > operator. > > Your first aids will be greatly appreciate. > Thank you. > > antoine.zahnd at iprolink.ch
- References:
- data structure definition?
- From: "schatzi" <antoine.zahnd@iprolink.ch>
- data structure definition?