SPVM::Stringable − Stringable Interface
class Point {
interface Stringable;
method to_string : string () {
my $x = $sel−>x;
my $y = $sel−>y;
my $string = "($x,$y)";
return $string;
};
}
Stringable interface in SPVM is the interface for stringable classes.
"required method to_string : string ();"
Returns the string representation for the instance.
Copyright (c) 2023 Yuki Kimoto
MIT License