> For the complete documentation index, see [llms.txt](https://go.netdpi.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://go.netdpi.net/variable/name_var.md).

# 04.01-如何命名變數

變數命名是軟體開發很重要的一部分，命名必須以字母開頭，而且有可能會包含字母、數字或 `_` （底線）符號。Go 編譯器不會管你如何命名變數，所以為了你好（及別人），應該要使用能清楚表達變數用途的名稱，假設如下：

```go
    x := "Max"
    fmt.Println("My dog's name is", x)
```

在此例子中，x 變數名稱就不是很好，好的命名應該如下所示：

```go
    name := "Max"
    fmt.Println("My dog's name is", name)
```

或者：

```go
    dogsName := "Max"
    fmt.Println("My dog's name is", dogsName)
```

在上例中，我們使用特殊的方式來表達變數名稱，即所謂的 lower camel case（也是所謂的 mixed case、bumpy caps、camel back 或 hump back）。字首的第一個字母是小寫的，接下來的文字其第一個字母是大寫的，而其它全部的字母都是小寫的。


---

# 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:

```
GET https://go.netdpi.net/variable/name_var.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
