The last (right most) digit specifies the content of the right most three bit positions (bits 29, 30, and 31).Each octal digit specifies three bit values.11 octal digits represent a full 32-bit word, with the leftmost digit allowed to be 0, 1, 2, or 3.There can be 1 to 11 octal digits (0 through 7).Standard Fortran does not allow these forms. Alternate Forms of Boolean Constantsį95 allows a Boolean constant (octal, hexadecimal, or Hollerith) in the following alternate forms (no binary). Logical entities are invalid in arithmetic, relational, or bitwise logical expressions.A Boolean expression can yield as many as 32 values. A logical expression yields one value.A Boolean constant can represent as many as 32 values. A logical variable or constant represents only one value.There is a LOGICAL statement, but no BOOLEAN statement.Variables, arrays, and functions can be of logical type, but they cannot be Boolean type.Boolean and logical types differ as follows:.No user-specified function can generate a Boolean result, although some (nonstandard) intrinsics can.If both operands are Boolean, the operation is performed as if they were integers.If one operand is Boolean, the operation is performed with no conversion. For binary arithmetic operators, and for relational operators:.Masking-A bitwise logical expression has a Boolean result each of its bits is the result of one or more logical operations on the corresponding bits of the operands.Miscellaneous Rules Governing Boolean Type There are no Boolean variables or arrays, and there is no Boolean type statement. Boolean Typeį95 supports constants and expressions of Boolean type. Known LimitsĪ single Fortran 95 program unit can define up to 65,535 derived types and 16,777,215 distinct constants. Compile with the -U option to have the compiler treat upper and lower case as unique. That means that a variable AbcDeF is treated as if it were spelled abcdef. Sun Fortran 95 is case insensitive by default. In the same program unit, tab form can be mixed with free or fixed form.In the same file, free form can be mixed with fixed form by using directives.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |