defunkt (owner)

Revisions

gist: 216124 Download_button fork
public
Public Clone URL: git://gist.github.com/216124.git
Embed All Files: show embed
break.ooc #
1
2
3
4
5
6
7
8
9
10
11
12
Vector3f: class {
  x, y, z : Float
 
  length: func -> Float { sqrt(x * x, y * y, z * z) }
}
 
main: func {
 diagonal := Vector3f new()
 diagonal x = 1.0 .y = 1.0 .z = 1.0
 printf("The length of a cube's long diagonal is: %.2f\n", diagonal length())
}
 
Text only #
1
2
3
4
5
6
→ ooc break.ooc
 
./break.ooc:9:20: Expected function call after a dot '.'
 diagonal x = 1.0 .y = 1.0 .z = 1.0
                   ^