> For the complete documentation index, see [llms.txt](https://tlcfem.gitbook.io/suanpan-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tlcfem.gitbook.io/suanpan-manual/basic/syntax.md).

# Model Syntax

## Command

All commands are case **insensitive**. Each command by default shall be written in one line.

It is not allowed to write two commands in one line.

To split one command into several lines, use the backslash (`\`) to concatenate. Only **one** backslash can serve as concatenation symbol in one line. Other backslashes (if any) will be kept and combined with other lines and may lead to wrongly interpreted command.

The leading and trailing whitespaces would be omitted by default.

## Separator/Delimiter

Either whitespace (`_`), including tab (`\t`), or comma (`,`) can be used as separator/delimiter.

## Comment

Comment lines start with the hash symbol (`#`) or the exclamation symbol (`!`).

Inline comments shall be denoted with the exclamation symbol (`!`) only. All contents after the first `!` will be treated as comments.

Comments can be mixed with concatenation. There can only be white spaces between `\` and `!`.

```
# this is a comment
! this is another comment
node 1 2 3 4 5 6 ! this is an inline comment
# split one command into multiple lines
node 2 9 7 5 1 3 \
3 4 5 \ ! comments can be put after backslash \
9 8 2
```

## Input

Inputs are mostly integers, doubles and strings. The model input file is a plain text file, scripting of any sorts is not supported. Math expressions are not available.

When the required input argument is an integer, it is not allowed to have a double in place. The decimal point cannot be read by the integer parser so may cause failure of command parsing.

However, a double input can be replaced by an integer (if desired value matches), type conversion is automatically done.

Some commands take Boolean values in form of string. For `true` value, following inputs are equivalent: `true`, `yes` , `1`, `on`, `t`, `y`. For `false` value, following inputs are equivalent: `false`, `no`, `0`, `off`, `f`, `n`. Again, commands, including inputs, are case-insensitive.

For all commands, compulsory arguments are denoted by rounded brackets `(n)`, optional arguments are denoted by square brackets `[n]`. Input arguments shall be defined in sequence. To change the default value of any optional arguments, all leading optional arguments (if any) shall be explicitly defined. For group arguments, `(n n+1...)` means arguments `n` and `n+1` appear as a group and must be defined due to rounded brackets, while `( ...)` means this group can be repeated to define a set of arguments. For square case, `[ ...]` means this group is optional.


---

# 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://tlcfem.gitbook.io/suanpan-manual/basic/syntax.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.
