Confronto tra tipi di dati in diversi linguaggi
Aggiornamento: novembre 2007
In questo argomento vengono elencati i tipi di dati per Visual Basic, C++, C#, JScript e Visual FoxPro.
Tabella dei tipi di dati
Contenuto e dimensione |
Visual Basic |
C++ |
C# |
JScript |
Visual FoxPro |
---|---|---|---|---|---|
Dati sconosciuti |
n/d |
VARIANT |
Consente di derivare i tipi, quindi di collegarli al nodo Derived Types. |
Object |
Variant |
Decimal |
Decimal (struttura .NET Framework) |
DECIMAL |
decimal |
n/d |
|
Date |
Date (struttura .NET Framework) |
DATE |
Oggetto Date |
Date DateTime |
|
Carattere SBCS (1 byte) |
n/d |
n/d |
sbyte |
Character |
|
Carattere Unicode (2 byte) |
Char (struttura .NET Framework) |
wchar_t |
char |
n/d |
|
Sequenza di caratteri Unicode |
String (classe .NET Framework) |
wchar_t* |
String |
VarChar |
|
Valore Boolean (dipendente dalla piattaforma) |
Boolean (struttura .NET Framework) |
VARIANT_BOOL |
boolean |
Logical |
|
1 byte |
Tipo di dati SByte (Visual Basic) (struttura .NET Framework) |
signed char |
n/d |
n/d |
|
2 byte |
Short (struttura .NET Framework) |
signed short int |
short |
n/d |
|
4 byte |
Integer (struttura .NET Framework) |
int |
Integer |
||
8 byte |
Long (struttura .NET Framework) |
long |
Float |
||
1 byte senza segno |
Byte (struttura .NET Framework) |
BYTE |
byte |
Integer |
|
2 byte senza segno |
Tipo di dati UShort (Visual Basic) (struttura .NET Framework) |
unsigned short |
n/d |
n/d |
|
4 byte senza segno |
Tipo di dati UInteger (struttura .NET Framework) |
unsigned int e unsigned long |
n/d |
n/d |
|
8 byte senza segno |
Tipo di dati ULong (Visual Basic) (struttura .NET Framework) |
unsigned __int64 |
n/d |
n/d |
|
4 byte a virgola mobile |
Single (struttura .NET Framework) |
float |
Float |
||
8 byte a virgola mobile |
Double (struttura .NET Framework) |
Double |
Double |
Vedere anche
Riferimenti
Confronto tra concetti di programmazione in diversi linguaggi con esempi di codice
Confronto tra operatori in diversi linguaggi
Confronto tra controlli e oggetti di programmazione in diversi linguaggi e librerie