Clasess


Spla is a object oriented language. It is started with a Class. A class name should be start with Upper case and class name and file name should be same. In Spla $ keyword is indicating Class.

Syntax

~~Starting of class~~
$ClassName:
   #methodname< parameters > returnType:
      ~~method_docstring~~
      method_suite;
      <- [expression];

Example

The following method takes a string as input parameter and prints it on standard screen.

$Student:
   #printme< str  strvar > int:
      ~~This prints a passed string into this method~~
      << strvar;
      <- 0;