Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Data Types

Primitive Types

TypeHanDescriptionExamples
Integer정수64-bit signed integer42, -10, 0
Float실수64-bit floating point3.14, -0.5
String문자열UTF-8 string"안녕하세요"
Booleantrue/false, 거짓
Void없음null/void없음

Type Coercion

Int and Float mix automatically:

출력(1 + 1.5)     // 2.5 (Float)
출력(3 * 2.0)     // 6.0 (Float)
출력(10 - 0.5)    // 9.5 (Float)

Compound Types

  • Arrays: [1, 2, 3] — type [정수]
  • Tuples: (1, "hello", 참) — type (정수, 문자열, 불)
  • Structs: 구조 사람 { 이름: 문자열 }
  • Enums: 열거 방향 { 위, 아래 }