2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 22:38:04 +02:00
LaTeX-examples/documents/Programmierparadigmen/scripts/x10/x10-struct-example.x10
Martin Thoma 860e3c066b X10
2014-03-28 11:06:02 +01:00

16 lines
No EOL
298 B
Text

struct Complex {
val real:Double;
val img :Double;
def this(r:Double, i:Double) {
real = r; img = i;
}
def operator + (that:Complex) {
return
Complex(real + that.real,
img + that.img);
}
}
val x = new Array[Complex](1..10);