#5 Alef++ Subroutines

closed
Interpreter (6)
5
2009-09-01
2009-08-06
No

add a local subroutines with supporting a overloading and type like Java :

sub mySub{
...
}
this sub return any object and support any number of parameters special variable $0 is an array

sub mySub (int){
...
}
here support just one parameter type int with special variable $1

sub mySub :long (int,String){
...
}
return long type and has two parameters with two special variables $1, $2

Discussion

  • now Alef++ subroutines can support a native Java arrays like this

    sub mysub ( int[ ) {

    }

    sub mysub( String[[ ){

    }

    ' int[ ' is Java array int[]
    ' String[[ ' is Java array String[][]

     
  • completed.

     
    • status: open --> closed