2024-08-25 11:44:06 +02:00
|
|
|
class Foo()
|
|
|
|
|
function Foo( this, name )
|
|
|
|
|
this.name := name;
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
function print( this, prefix )
|
|
|
|
|
::print( $"{prefix}: {this.name}!" );
|
|
|
|
|
endfunction
|
2026-01-10 11:18:58 +01:00
|
|
|
|
2026-01-10 18:12:09 +01:00
|
|
|
function set_member( this, param )
|
|
|
|
|
this.print( $"succeeded with method_id call {param}" );
|
|
|
|
|
return "done";
|
2026-01-10 11:18:58 +01:00
|
|
|
endfunction
|
2024-08-25 11:44:06 +02:00
|
|
|
endclass
|
|
|
|
|
|
|
|
|
|
var obj := Foo( "NAME" );
|
2024-10-08 21:53:30 +02:00
|
|
|
obj.print( "PREFIX" );
|
2026-01-10 18:12:09 +01:00
|
|
|
print( obj.set_member( "param" ) );
|
2026-01-10 11:18:58 +01:00
|
|
|
|