Code: Select all
class Car
{
Color := "Red"
Speed := 50
Brake := 10
}
Code: Select all
class Car
{
__New()
{
this.Color := "Red"
this.Speed := 50
this.Brake := 10
}
}
Code: Select all
class Car
{
Color := "Red"
Speed := 50
Brake := 10
}
Code: Select all
class Car
{
__New()
{
this.Color := "Red"
this.Speed := 50
this.Brake := 10
}
}
Code: Select all
class Car
{
__Init() {
this.Color := "Red"
this.Speed := 50
this.Brake := 10
}
}
Code: Select all
class Car
{
Static Color := "Red"
Static Speed := 50
Static Brake := 10
__New() {
; ...
}
}
Msgbox % Car.Color ; "Red"
x := new Car()
Msgbox % x.Color ; "Red"
Msgbox % x.HasKey("Color") ; False
Car.Color := "Blue"
Msgbox % x.Color ; "Blue"