際際滷

際際滷Share a Scribd company logo
PRIMITIVE TYPES
-Primitive types
-Ranges of values that each type can represent
-Where each type would be used best
Numerical types: Ints, Floats, Doubles
 Let int1 : Int = 0
 Let int2 : Int8 = 127
 Let int3 : Int
 Let int4 = 54
 Let int3: Uint = -2 cannot assign negative value to Uint
 Let float1 : Float = 54.5
 Let double1 : Double = 54.6
 Let double2 : Double = 5
Boolean : true/false
 Let bool1 : Bool = false
 Let bool2 : Bool = 5 > 3
 *testing condition
Character
 One digit in length, between  
 Let char1 : Character = ?
 Let char2 : Character =  息
 Let char3 : Character = 5 just a character, not number
 Let char4 : Character =   not allowed

More Related Content

Primitive types

  • 1. PRIMITIVE TYPES -Primitive types -Ranges of values that each type can represent -Where each type would be used best
  • 2. Numerical types: Ints, Floats, Doubles Let int1 : Int = 0 Let int2 : Int8 = 127 Let int3 : Int Let int4 = 54 Let int3: Uint = -2 cannot assign negative value to Uint Let float1 : Float = 54.5 Let double1 : Double = 54.6 Let double2 : Double = 5
  • 3. Boolean : true/false Let bool1 : Bool = false Let bool2 : Bool = 5 > 3 *testing condition
  • 4. Character One digit in length, between Let char1 : Character = ? Let char2 : Character = 息 Let char3 : Character = 5 just a character, not number Let char4 : Character = not allowed