The information in this article applies to:
SUMMARY
The text below lists the data type conversion methods provided in Microsoft
FORTRAN versions 5.0 and 5.1. The article includes information on the
following:
MORE INFORMATIONIntrinsic FunctionsThe following table lists the FORTRAN intrinsic functions that perform data type conversions.
For more information about the data conversion intrinsic functions,
see pages 240-241 of the Microsoft FORTRAN "Reference" manual for
versions 5.0 and 5.1
$STORAGE MetacommandThe $STORAGE:n metacommand allocates "n" bytes of memory for all INTEGER and LOGICAL variables. For example, when an application specifies the $STORAGE:2 metacommand and declares an INTEGER variable B, the compiler allocates two bytes for B instead of four. The $STORAGE metacommand does not affect memory allocation when a declaration includes an explicit length specification, such as an INTEGER*2 or INTEGER*4.For more information about the $STORAGE metacommand, see pages 34 and 308 of the Reference manual for versions 5.0 and 5.1 IMPLICIT StatementIf an application does not explicitly define a data type for a name, the compiler uses the first letter of the variable or function name to determine its type. By default, names that begin with the letters I, J, K, L, M, or N are of type INTEGER. Names that begin with one of the other letters or with a dollar sign ($) are of type REAL. An application can use the IMPLICIT statement to override the default type assignment.For more information on the IMPLICIT statement, see pages 8 and 181- 182 of the Reference manual for versions 5.0 and 5.1. Internal READ and WRITE StatementsReading from an internal file converts ASCII values to numeric, logical, or character values while writing to an internal file converts the internal values to ASCII text. For more information on the internal READ and WRITE statements, see pages 77-78 of the Reference manual for versions 5.0 and 5.1The following code example converts a character variable to an integer. Sample Code
Additional query words: kbinf 5.00 5.10
Keywords : |
Last Reviewed: November 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |