Functions

Facts about RIDE functions

  • A function has to return a value.
  • The return type is not specified in a function's signature.
  • A function has to be defined above the place of its usage.

Examples

Definition of a function with no parameters that returns the integer:

func main() = {
   3
}

Definition of a function with two parameters:

func main(amount: Int, name: String) = {
   throw()
}

results matching ""

    No results matching ""