> ## Documentation Index
> Fetch the complete documentation index at: https://gocharting.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Names and conventions

> The Lipi spelling of things other languages call differently, with the message the compiler gives for the other form, and the rules for names.

If you know another scripting language, some of what you type from habit does not exist in Lipi. Each row was compiled; the right
column is the editor's message for the form on the left.

| You may expect | Lipi has | The compiler says to the other form |
| - | - | - |
| Transparency 0 to 100: `color.new(c, 50)`, `transp=50` | Opacity 0 to 1: `color.new(c, 0.5)`, argument `alpha` | Warning: opacity 50 is outside 0–1; 1 is solid. For `transp=`, two errors: The `color.new()` function is missing required argument(s): `alpha`. and The `color.new()` function does not accept a named argument `transp`. |
| `array.size(a)`, `a.size()` | `array.length(a)`, `a.length()` | Namespace `array` has no function `size`. Did you mean `slice()`? and Could not find any type function `size` for `a`. |
| `chart.point.now(...)` | `chartPoint.now(...)`, `chartPoint.new(...)` | Namespace `chart` has no variable `point`. |
| `var x = 0` | `static x = 0` | `var` is not a valid type in variable declaration. |
| `int n = len / 2` | `int n = math.floor(len / 2)` | Declared type `int` is not compatible with assigned type `input float`. Use math.floor(), math.round(), or math.ceil() if you need a whole number. |
| A variable called `step` | another name; `step` stays valid as a named argument | no viable alternative at input 'intstep' |
| `timeframe.period` | `interval.interval`, `interval.isdaily`, `interval.multiplier` | No variable with name `timeframe` found. |
| `array.get(a, 0).price` | `P p = array.get(a, 0)` then `p.price` | inside a call: mismatched input '.' expecting ')'; as a statement: extraneous input '.' expecting \{\<EOF>, NEWLINE} |
| A function that sets a global variable | return the value and assign it at the top level | Cannot modify global variable `g` in function. |
| `force_overlay=true` on `line.new` | `forceOverlay=true` on `line.new` only; other calls use `force_overlay` | The `line.new()` function does not accept a named argument `force_overlay`. Did you mean `forceOverlay`? |
| `x ^ 2` | `math.pow(x, 2)` | extraneous input '^' expecting \{\<EOF>, NEWLINE} |
| `a = 1; b = 2` | one statement per line | extraneous input ';' expecting \{\<EOF>, NEWLINE} |
| `x = if c { ... }` | `x = c ? a : b`, or assign inside an `if` statement | extraneous input '\{' expecting \{\<EOF>, NEWLINE} |
| `close == na` | `na(close)` | Warning: Do not use the `na` variable to compare other values to 'na', use the `na()` function instead |
| `plot(close, style=plot.style_line)`, `hline.style_dashed` | `style=plotStyle.line`, `hlineStyle.dashed` | No variable with name `plot` found. (`hline` likewise) |
| `color.pink`, any other color name | the 17 constants (`color.lime`, ...), `color.rgb(255, 192, 203)` or `#FFC0CB` | Namespace `color` has no variable `pink`. Did you mean `lime`? |
| `str.format("{0}", x)` | `"text " + str.tostring(x)` | Namespace `str` has no function `format`. |
| `request.security(...)` | nothing (no other symbol or interval) | No variable with name `request` found. |

## ta and talib

`ta` and `talib` are two names for one namespace with the same 62 functions: `ta.sma` is `talib.sma`. Messages always say `talib`, and so
do the examples here.

## Rules for names

* A name is ASCII letters, digits and `_`, not starting with a digit, and case-sensitive: `Close` is a new variable, `CLOSE` does not exist.
* Reserved words, which no variable or parameter may be called: `static intra func type enum def if else for while switch break continue
  return to step in case default and or not true false na const simple series`.
* A built-in variable (`close`, `volume`, `bar_index`, ...) cannot be redeclared or assigned: `` `close` is a built-in name and cannot be redeclared. ``
* A variable may be named like a namespace (`array`, `math`) or a function; the compiler warns about a namespace name. Avoid both.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.