Function Defination and Call
// define a function
void some_function () {
// some logic
}
// call the function
some_function ();
public class Main {
public static void Main ( String [ ] args ) {
// call the function
SomeFunction ( ) ;
}
// define a function
public static void SomeFunction ( ) {
// logic
}
}
// define a function
void someFunction () {
// some logic
}
// call the function
someFunction ();
package main
func main () {
// call the function
someFunction ();
}
// define a function
func someFunction () {
// logic
}
public class Main {
public static void main (String [] args ) {
// call the function
someFunction ();
}
// define a function
public static void someFunction () {
// logic
}
}
// define a function
function someFunction ( ) {
// logic
}
// call the function
someFunction ( ) ;
// define a function
fun someFunction () {
// logic
}
// call the function
someFunction()
# define a function
sub some_function {
# logic
}
# call the function
some_function();
<?php
// define a function
function someFunction ()
{
// logic
}
// call the function
someFunction ();
?>
# define a function
def someFunction :
# logic
# call the function
someFunction
# define a function
def someFunction ( )
# logic
end
# call the function
someFunction
// define a function
def someFunction (): Unit = {
println(" Hello, world" )
}
// call the function
someFunction
// define a function
func someFunction( ) {
// logic
}
// call the function
someFunction ( )