VMS Help  —  FORTRAN  Data  Constants  Type of BOH Constants
  Binary, octal, and hexadecimal constants are "typeless" numeric
  constants.  They assume data types based on their usage, according
  to the following rules:

   o  When the constant is used with a binary operator, including the
      assignment operator, the data type of the constant is the data
      type of the other operand.

   o  When a specific data type is required, that type is assumed for
      the constant.

   o  When the constant is used as an actual argument, if the bit
      constant is greater than 4 bytes, INTEGER*8 is assumed;
      otherwise, INTEGER*4 is assumed.

   o  When the constant is used in any other context, an INTEGER*4
      data type is assumed (unless a compiler option indicating
      integer size specifies otherwise).

  These constants specify up to 16 bytes of data.  When the length of
  the constant is less than the length implied by the data type, the
  leftmost digits have a value of zero.

  When the length of the constant is greater than the length implied
  by the data type, the constant is truncated on the left.  An error
  results if any nonzero digits are truncated.
Close Help