Академический Документы
Профессиональный Документы
Культура Документы
|
½hen a variable has not yet been assigned a value in the program, it is
said to be ³undefined´.
A variable can only store one value or string at a time. If a new value or
string is assigned to the variable after it is first initialized in a program,
the new value replaces the old one.
| aracter Strings
Y ample
CHARCTYR (LY STATY, STATY
STATY
HA½AII¶
STATY
ICHIGA´
Rules
± If the declared length and the string size are the same, all characters are
stored in the character variable
± If the declared length is longer than the string, then blank ³padding´ will be
added to the right of the string to equalize the lengths.
± If the declared length is shorter than the string length, the string is truncated.
± o arithmetic operations
Arit metic Expressions
All ( are evaluated first. Innermost ( are evaluated first in
e pressions that contain nested ( .
Operator Precedence
1. e ponentiation (**
. multiplication and division (*,/
. addition and subtraction (+,- Can be used as a sign, but standard
Fortran does not allow two operands to appear side by side
Avoided if possible
Declare real variables to perform operations.
The only case where mi ed-mode operation is
desired is
e.g. %& **
e.g. !"(( is a valid operation but !"((!"
is not.
ntrinsic Functions