Dart Programming - Calling a Function


Advertisements

A function must be called to execute it. This process is termed as function invocation.

Syntax

function_name()

The following example illustrates how a function can be invoked −

void main() { 
   test(); 
}  
test() { 
   //function definition 
   print("function called"); 
} 

It will produce the following output

function called
dart_programming_functions.htm
Advertisements