SPL Procedure - Define function having return value


1. Define function without argument
  1. You can define function by using "procedure - end" commands.

      
    clear
    
    print "Cur date is " + func1()
    
    procedure func1
      return Util.Now()
    end
    
      
 

  1. Executed result is as follows.




2. Define function having argument
  1. You can define function having arguments as follows.

      
    clear
    
    print "Sum is " + func2(100, 200)
    
    procedure func2(a, b)
      return a + b
    end
    
      


  2. Executed result is as follows.