// Methods - Struct with methods using extend extern func Std_Io_PrintLine(s: String); extern func Std_Io_PrintInt(n: int); struct Rectangle { width: int; height: int; } extend Rectangle { func Area(self: Rectangle) -> int { return self.width * self.height; } func Perimeter(self: Rectangle) -> int { return 2 * (self.width + self.height); } } func Main() -> int { let rect: Rectangle = Rectangle { width: 10, height: 5 }; Std_Io_PrintLine("Rectangle:"); Std_Io_PrintLine("Width = "); Std_Io_PrintInt(rect.width); Std_Io_PrintLine(""); Std_Io_PrintLine("Height = "); Std_Io_PrintInt(rect.height); Std_Io_PrintLine(""); Std_Io_PrintLine("Area = "); Std_Io_PrintInt(rect.Area()); Std_Io_PrintLine(""); Std_Io_PrintLine("Perimeter = "); Std_Io_PrintInt(rect.Perimeter()); Std_Io_PrintLine(""); return 0; }