# Code formatting

It is highly recommended to have a consistent code format across all your modules.

## Code sections&#x20;

It is highly recommended to have 4 different sections for every `.inc` or `.ini` file:

```
; THIS IS THE HEADER SECTION, THOUGH NORMALLY I DON'T RULE THIS SECTION OUT

[Rainmeter]
Update=-1

; This is the place to include variables

; ---------------------------------------------------------------------------- ;
;                                   Function                                   ;
; ---------------------------------------------------------------------------- ;

; This is where you should put & include all the measures

; ---------------------------------------------------------------------------- ;
;                                  MeterStyles                                 ;
; ---------------------------------------------------------------------------- ;

; This is where you should put & include all the meter styles

; ---------------------------------------------------------------------------- ;
;                                    Content                                   ;
; ---------------------------------------------------------------------------- ;

; This is wherre you should put & include all the meters
```

## Naming

Of course, you can name however you want, but here are some styles that I recommend

### Variables

`#element_Name#` where `Name` is a value for `element` (e.g. `#Pri_Color#`)

`#n#` where `n` is a short form or first letter of the variable name `name` (e.g. `#R#`)

### Meters

`[Element.MeterType]` where `Element` is what meters make of, and `MeterType` is the type of the meters.

`[GroupIndex]` where `Group` is what the meter is part of (for example, a list) and `Index`is an integer appended to the meter. Useful for multiple elements of a list

### MeterStyles

`[Element.MeterType:S]` for a style for `MeterType` of `Element`

`[Level.Element:S]` for a style which is above the main module file (e.g. Core) and is applied to a single meter to make `Element`.&#x20;

`[ElementStyle]` for a quick low-level meter style for `Element`

### Measures

`[mFunction]` for a measure with `Function` (e.g. `toggle` for a toggle function, `CPUPer` for returning the percentage of CPU usage)

`[ACTIONACTIONNAME]` for a [Measures](/coding-a-module/measures.md#nuol-measure)which executes `ACTIONNAME`. The prefix `ACTION` is literal.


---

# Agent Instructions: 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://wiki.jaxcore.app/coding-a-module/code-formatting.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.
