일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- array
- golang pointer
- 패스트캠퍼스업스테이지부트캠프
- 메서드
- 함수
- 상수
- Pointer
- UpstageAILab
- golang slice remove
- golang array
- slice
- 타입
- 패스트캠퍼스업스테이지에이아이랩
- 업스테이지패스트캠퍼스
- golang
- receiver
- scope
- 변수
- 스코프
- package
- keyword
- 국비지원
- struct
- 패스트캠퍼스AI부트캠프
- golang slice
- method
- 패스트캠퍼스
- receiver method
- golang interface
- Interface
Archives
- Today
- Total
목록2024/07/20 (1)
느리지만 꾸준히, 코딩
Golang Constants(상수)
상수란?상수는 프로그램 실행 중 변경되지 않는 고정된 값을 나타냅니다. 상수 정의Golang에서 상수는 const 키워드를 사용하여 정의합니다.const Pi = 3.14159const MaxUsers = 100const Greeting = "Hello, World!" 여러 상수를 그룹으로 정의할 수도 있습니다const ( StatusOK = 200 StatusNotFound = 404 StatusInternalServerError = 500)타입이 있는 상수와 없는 상수1. 타입이 없는 상수const MaxValue = 100 2. 타입이 있는 상수const MaxValue int = 10 타입이 없는 상수는 더 유연하게 사용할 수 있으며, 필요에 따라 암시적으로 타입 변환이 가능합니다..
프로그래밍/Golang
2024. 7. 20. 09:00