Updated in 2024 : 3 : 19 : Data Types: Programming Languages ;

 

Mostly in a run-time, a program needs variables to handle/manage data. To do so, in design-time, variables must be defined by what types of data they will contain. Also see: Code Shortcuts; Hardware makes software deployable; Mathematics; Script;

 

Data-type

 

C

Delphi 4

Modula-2

Java 2

 

Remark

 

64 bit Integer

 

Int64

 

 

 

 

 

Boolean

Non-zero is TRUE, 0 is FALSE

Boolean

Boolean

true is TRUE

false is FALSE

Boolean

 

 

Byte

 

 

Byte

 

Byte

 

 

 

Cardinal

 

 

Cardinal

 

 

 

 

 

Character

 

char

Char

char

 

 

 

Character (Unicode)

 

 

 

Char

 

2 bytes for each character

Computational

 

 

Comp

 

 

 

 

Currency

 

 

Currency

 

 

 

 

Double

 

 

Double

 

 

 

(Must be checked whether it is double precision floating point)

Extended

 

 

Extended

 

 

 

 

 

Integer

 

i n t

Integer

 

i n t

 

 

Integer (arithmetic modulo 2n)

unsigned i n t

 

 

 

 

 

Long Integer

 

 

LongInt

 

 

Long

 

 

 

Real

 

float

 

Real

real

Float

 

 

Real (Double Precision)

double

 

 

 

Double

 

 

Short Integer

 

 

Short I n t

 

Short

 

 

Single

 

 

Single

 

 

 

 

Small Integer

           

 

Small I n t

 

 

 

 

String

 

 

 

 

String

 

 

 

Variant

 

 

Variant

 

 

 

 

 

Wide Character

 

Wide Char

 

 

 

 

Word

 

Word

 

 

 

 

Data type – Char in Java 2 takes two bytes for each character. But, Char in Delphi 4 does not. To prove whether 2 bytes or 1 byte, char is needed to be tested by Java, and by Delphi, while testing, bit-wise check between ASCII and Unicode.

Note: Width of a processor’s data bus can be called Word. Since processor may vary, thus Word data-type is machine dependent. At one time, in an instruction, Word contains the largest amount of data which can be fetched into a processor. Data-type Word is nothing to do with word-processing.  

 

Data Type: SQL (Database)

The following table contains data-types of SQL language in Microsoft SQL Servers. Data-type’s value and usage may vary among Relational Database Management System (RDBMS)s – Oracle, DB2, Informix, Open-I n g r e s, FoxPro, and so on.

 

Data-type

SQL 89 Standard

SQL 92 Standard

RDBMS

Value

Remark

U D T, User Defined Type MS SQL Server 2005
XML data     MS SQL Server 2005    
           

binary

 

binary

MS SQL 7.0

8000 byte maximum; fixed length

Binary data

v a r binary

 

binary varying

MS SQL 7.0

8000 byte maximum, variable length

Binary data

bit

 

bit

MS SQL 7.0

Either 0(zero) or 1(one)

Also see: Computing Measurement

char

 

character

MS SQL 7.0

8000 characters maximum; fixed length

Unicode character set is not included; see: Character Set

v a r char

 

character varying

MS SQL 7.0

8000 characters maximum; variable length

Unicode character set is not included; see: Character Set

cursor

 

cursor

MS SQL 7.0

Reference to cursor

 

datetime

 

date time

MS SQL 7.0

From 1/1/1753 to 12/31/9999

3/100 second accuracy; Date data

decimal

 

decimal

MS SQL 7.0

From (-1.0E + 38)-1 to          

         (1.0E + 38)-1

Numeric exactly

float

 

double precision

MS SQL 7.0

From (-1.79E + 308) to     

         (1.79E + 308)

Numeric approximately

float

 

float

MS SQL 7.0

From (-1.79E + 308) to     

         (1.79E + 308)

For floating point calculation: float n where n = 1-53; Numeric approximately

real

 

float

MS SQL 7.0

From (-1.79E + 308) to     

         (1.79E + 308)

For floating point calculation: float n where n = 1-24; Numeric approximately

image

 

image

MS SQL 7.0

2,147,483,647 byte maximum; variable length

Binary data

i n t

 

integer

MS SQL 7.0

From  -2,147,483,648  to 2,147,483,647

Integer data

money

 

money

MS SQL 7.0

From -922,337,203,685,477.5808  to 922,337,203,685,477.5807

Money data

n v a r char

 

national char varying

MS SQL 7.0

4000 characters maximum; variable length

Unicode character set only

n char

 

national character

MS SQL 7.0

4000 characters maximum;       fixed length

Unicode character set only

n text

 

national text

MS SQL 7.0

1,073,741,823 characters maximum; variable length

Unicode character set only

decimal

 

numeric

MS SQL 7.0

From (-1.0E + 38)-1 to          

         (1.0E + 38)-1

Numeric exactly

small date time

 

small date time

MS SQL 7.0

From 1/1/1900 to 6/6/2079

1 minute accuracy; Date data

small i n t

 

small integer

MS SQL 7.0

From -32,768 to 32,767

Integer data

small money

 

small money

MS SQL 7.0

From -214,748.3648 to 214,748.3647

Money data

text

 

text

MS SQL 7.0

2,147,483,647 characters maximum; variable length

Unicode character set is not included; See: Character Set

timestamp

 

timestamp

MS SQL 7.0

Unique number of the database

Unique database data

tiny i n t

 

tiny integer

MS SQL 7.0

From 0 to 255

Integer data

unique identifier

 

unique identifier

MS SQL 7.0

Unique identifier; G U ID

Unique global data

 

Data Type: OS Windows

Data Type Reference Remark
...    
sint32 RFC1213 Signed bit included in instruction to processor; 32 bit quantity
string RFC1213  
uint32 RFC1213 Unsigned: signed bit not included in instruction to processor; 32 bit quantity
...    

 

 

Up