
samples.categories.methods.getter.pec Maven / Gradle / Ivy
define firstName as Text attribute
define lastName as Text attribute
define fullName as Text attribute
define Person as category with attributes firstName, lastName and fullName, and methods:
define fullName as getter doing:
return firstName + " " + lastName
define main as method doing:
p = Person with "Arthur" as firstName and "Rimbaud" as lastName
printLine "fullName -> " + p.fullName
© 2015 - 2025 Weber Informatics LLC | Privacy Policy