Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain what the length of a dynamic array is #160

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/cvl/expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ Attempting to access more complex types will yield a type checking error. For ex
an entire array with `currentContract.myState[0].bar[addr]` will fail.

```{note}
Although entire arrays cannot be accessed, the _length_ of the dynamic arrays can be accessed with `.length`, e.g., `currentContract.myState[0].bar[addr].length`.
Although entire arrays cannot be accessed, the _length_ or the _number of elements_ of the dynamic arrays
can be accessed with `.length`, e.g., `currentContract.myState[0].bar[addr].length`.
```

```{warning}
Expand Down