mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* Add escript guide docs for classes * Add ClassInstanceRef to objref docs * Use objref.dot to generate svg
11 lines
310 B
Text
11 lines
310 B
Text
class Person()
|
|
function Person( this, name, age )
|
|
this.name := name;
|
|
this.age := age;
|
|
endfunction
|
|
endclass
|
|
|
|
var person := Person( "Alice", 25 );
|
|
var other_person := person.function.new( "Bob", 30 );
|
|
|
|
print( $"{other_person.name} is {other_person.age} years old." ); // Output: Bob is 30 years old.
|