The general form of the DATA statement is
In this example, the DATA statement assigns the variable sum the value 0.0, the variable area the value 23.3, the variable length the value 4.5, and the variable side the value 23.7. The data values should match the variables in number and type. Because the DATA statement is a specification statement, it should precede all executable statements and be placed near the beginning of the program following the declaration statements.
The PARAMETER statement is a specification statement used to assign names to constants (values that you do not want to change for the duration of a program). Its general form is
Because the proper type must first be assigned vto the constant, the type statement REAL pi must precede the PARAMETER statement.
A variable can store only one value at a time. For b, a REAL variable, the following statements, executed in sequence,
would first assign the constant 2.6 to b and then assign the constant 3.4 to b. The value 2.6 would be lost and b would retain the value 3.4