Difference between revisions of "Integer/it"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{Multi-lang}}{{LSL Header{{#var:lang}}}}
{{Multi-lang}}
{{LSL Header|ml=*}}
{{LSL Header|ml=*}}
{{LSLC|}}{{LSLC|Types}}
{{LSLC|}}{{LSLC|Types}}

Revision as of 05:06, 30 May 2010

Integers

il tipo di dati integer è un valore di 32 bit value contenuto nel range di −2,147,483,648 e +2,147,483,647 (questi sono da 0x80000000 a 0x7FFFFFFF nei valori esadecimali). I valori Integer sono solo valori interi, i valori frazionari vengono specificati con float/it.

DEBUG_CHANNEL può essere usato come una costante per l'intero massimo

Examples

Tutti i valori seguenti sono valori interi: <lsl>integer firstInt = 5512623; integer secondInt = ACTIVE; integer thirdInt = 0x61EC1A; integer fourthInt = -160693;</lsl>

I seguenti NON sono valori interi, è bene usare float per loro: <lsl> integer decimalValue = 125.2; // ERROR : Type mismatch -- Il valore Integer non deve contenere valori con la virgola integer bigValue = 3147483647; // Troppo grande, integer non può essere maggiore di 2,147,483,647. integer biggerValue = 10123456789; //Tutti i documenti restituiscono -1 // Troppo grande, integer non può essere maggiore di 2,147,483,647. </lsl>

Further Reading

LSL in Focus: Integers.