[Robelle] [SmugBook] [Index] [Prev] [Next]

Long Versus Short Numbers

Long and Short are very confusing terms when used to describe the number of bits in a numeric value. Long and short have different meanings in each HP programming language. Some languages refer to double as well as long and short.

Text version.

16-bit int32-bit int64-bit int
Cshortlong
Pascalshortintintegerlongint
SPLIntegerDouble
FortranInteger*2Integer*4
32-bit real64-bit real128-bit real
Cfloatdoublelong double
Pascalreallongreal
SPLRealLong
FortranRealDouble PrecisionReal*16

Note: In FORTRAN, the $Short compiler command makes Integer*2 the default, $Long selects Integer*4.


[Robelle] [SmugBook] [Index] [RISC] [Prev] [Next]