# Function & Pointer

## Basic Functions and Subroutines

Basic Functions and Subroutines A computer program which is complex and large, can be broken up into many subprograms. There is only one “main” program and the other subprograms are called subroutines or functions. The subprograms can be larger than the main program. Functions are designed so they can appear in an algebraic expression, for …

## Subprogram

A subprogram is a program unit which performs a particular task and has its own constant variables, labels and statements. It can be tested and compiled separately.

## What is statement function ?

Statement Function is defined in a program or a subprogram and Statement Function is used internally where it defined. It has a single statement and similar in form to an arithmetic, logical or character assignment statement. In a statement function statement must appear only after the specification statements and before the first executable statement of …

## Intrinsic Function or Library Function

An intrinsic function is a built-in function that returns a single value. Prewritten programs that are built-in the computer and available to be used to compute a single value. Intrinsic functions and math subroutines convert values from one data type to another, perform data manipulation, and also perform basic mathematical functions, such as calculating sines, …

## External Function

An external function is specified externally to the program unit that references it. An external function is a procedure and may be specified in a function subprogram or by some other means

## What is Subroutine ?

Subroutines begin with subroutine name (arg1, arg2,…), then the types of all arguments and local variables should be declared. Subroutines end with the statements return and end. Subroutines are called from another routine with the command call name (arg1, arg2,…). Where it used: If more than one value is to be returned to the main …

## What is pointer ?

What are Pointers? Pointer is a type of variable which stores other variables called targets. A pointer is a new type of variable which may reference the data stored by other variables (called targets) or areas of dynamically allocated memory. Pointers have been included in Fortran 90, but not in the usual way as in …

Scroll to Top