Data Types
Summary
- Memory only stores binary data
- Anything can be represented in binary
- Programs determines what the binary represents
- Basic types that are universally useful are provided by the languag
Basic Data Types
Boolean
- true
- false
Integer
- 1
- 2
- 50
- 99
- -2
Double / Float
- 1.1
- 5.5
- 200.0001
- 2.0
Character
- 'A'
- 'B'
- 'c'
- '6'
- '$'
Warning
Characters are always represented via single quotation mark ' '
While strings always use double quotation marks " "
String
- "Hello"
- "string"
- "this is a string"
- "it's 42"