implementing classes and instances (ch27)

This commit is contained in:
2024-08-31 10:01:39 +02:00
parent 2e6f977b34
commit c8cd24afbf
9 changed files with 171 additions and 4 deletions

View File

@ -0,0 +1,16 @@
class Brioche {}
print Brioche();
class Toast {}
var toast = Toast();
print toast;
print toast.jam = "grape";
print toast.jam;
class Pair {}
var pair = Pair();
pair.first = 1;
pair.second = 2;
print pair.first + pair.second;