Manifest typing
From Wikipedia, the free encyclopedia
In computer science, manifest typing is when the software programmer explicitly identifies the type of each variable being declared. For example: if variable X is going to store integers then its type must be declared as integer.
In contrast, some programming languages allow for dynamic typing in which the variable is just declared. Appropriate storage for the variable will be allocated during run time.
[edit] Examples
Consider the following example written in the C programming language:
#include <stdio.h> int main(void) { char s[] = "Test String"; float x = 0.0; int y = 0; printf("Hello World\n"); return 0; }
Note that the variables s, x, and y were declared as a character array, floating point number, and an integer respectively.
In the Python programming language, the types are not explicitly declared. Instead, the type is determined by the assigned value.
import sys s = "Test String" x = 0.0 y = 0 print "Hello World" sys.exit(0)