> For the complete documentation index, see [llms.txt](https://v-community.gitbook.io/v-by-example/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v-community.gitbook.io/v-by-example/jp/examples/section_1/primitives.md).

# プリミティブ型

Vのプリミティブ型は、Go言語よりも少なくなっています。

## 基本型

* bool型（`true`または`false`）
* string型
* integer型（`int`）
* float型（`float`）
* rune型（Unicodeコードポイント）-- `0xf09f9880`など

## 複合型

* array型（`[]`）
* map型（`{}`）
* struct型

## integer型

integer（整数）型はさらに`signed`（符号あり）と`unsigned`（符号なし）に分けられます。`signed`は正または負の値を表しますが、`unsigned`は正の値だけを表します。

### 符号あり整数

| 型名       |   サイズ  |             値の範囲 |
| -------- | :----: | ---------------: |
| `int8`   |  8ビット  |     -128 〜 27 -1 |
| `int16`  |  16ビット |   -215 〜 215 - 1 |
| `int`    |  32ビット |   -231 〜 231 - 1 |
| `int64`  |  64ビット |   -263 〜 263 - 1 |
| `int128` | 128ビット | -2127 〜 2127 - 1 |

### 符号なし整数

| 型名     |   サイズ  |         値の範囲 |
| ------ | :----: | -----------: |
| `byte` |  8ビット  |    0 〜 27 -1 |
| `u16`  |  16ビット |  0 〜 215 - 1 |
| `u32`  |  32ビット |  0 〜 231 - 1 |
| `u64`  |  64ビット |  0 〜 263 - 1 |
| `u128` | 128ビット | 0 〜 2127 - 1 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://v-community.gitbook.io/v-by-example/jp/examples/section_1/primitives.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
