You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auf jedem Struct gibt es ein zusätzliches Property: is_default welches mit True initialisiert wird. Sobald dass Struct zugewiesen wird wird dieses Property auf false gesetzt. Der Benutzer kann dann dieses Property abfragen.
Everytime an uninitialized property is accessed, we initialize it before accessing it e.g.
struct Person {
name: string // default ""
age: int // default 0
father: Person. // nil until accessed
}
p = new Person() // name = "", age = 0, father = nil
p.name = "Max"
p.father.name = "Maximilian" -> Initialize father with the Default Person Struct when accessing it for the first time.
Structs should be supported.
Struct Declaration:
Struct Creation:
Struct Usage:
The text was updated successfully, but these errors were encountered: