Everything related to programming will always come back to the concept of data storage. Without any data to act upon, the processes defined via our scripts are somewhat pointless. Mel has 4 main data storage methods
variables
external ascii or binary files
The Maya Dependency Graph
optionVar for preferences and settings
This page will only deal with variables, the other types are dealt with in later sections.
There are 3 basic types available within maya, namely int, float, and string. The general form of a variable declaration looks like that shown below. The typename (ie, int, float, string) describes the type of data that this variable will hold. The value assigned to the variable should hold a data type compatible the typename.
The variable_name is used to uniquely define the variable in conjunction with a $ symbol. For example, if the <variable_name> was counter, then we would need to use $counter to get and set it's value