25.06.2019 Views

Introduzione alla programmazione

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

www.filoweb.it<br />

ALLEGATI: LE VARIABILI.<br />

Tipo Dimensione (bit) Valori<br />

sbyte 8 da -128 a 127<br />

byte 8 da 0 o 255<br />

short 16 da -32.768 a 32.767<br />

ushort 16 da 0 a 65.535<br />

char 16 Un carattere Unicode da 0 a 65.535<br />

int 32 da -2.147.483.648 a 2.147.483.647<br />

uint 32 da 0 a 4.294.967.295<br />

long 64 -9.223.372.036.854.775.808 a 9.223.372.036.854.775.807<br />

ulong 64 0 a 18.446.744.073.709.551.61<br />

float 32 7 cifre da 1,5 x 10-45 a 3,4 x 1038<br />

double 64 da 5,0 x 10 -324 a 1,7 x 10 308<br />

decimal 128 28-29 cifre decimali da 1,0 x 10 -28 a 7,9 x 10 28<br />

bool 32 true o false (vero o falso)<br />

string<br />

16 * lunghezza stringa<br />

nell’uso delle variabili non si deve mai usare una parola riservata del linguaggio;<br />

se il linguaggio è case sensitive (come in C#) attenzione alle maiuscole e minuscole;<br />

si pò usare il simbolo _ (underscore) ma non caratteri speciali come: &, ?, !.<br />

34

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!