Skip to content

Commit e5e015e

Browse files
committed
update
1 parent d461d41 commit e5e015e

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

articles/azure-resource-manager/bicep/data-types.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ Arrays in Bicep are immutable. Once declared, their contents can't be changed. T
1818

1919
You can declare arrays in Bicep using either single-line or multi-line syntax:
2020

21-
| Syntax | Example |
22-
| -------------- | -------------------------------------------- |
23-
| Single-line | `var arr = ['a', 'b', 'c']` |
24-
| Multi-line | <pre>var arr = [<br> 'a'<br> 'b'<br> 'c'<br>]</pre> |
25-
26-
- **Single-line arrays** use commas (`,`) to separate values.
27-
- **Multi-line arrays** don't use commas between values.
28-
- You can mix single-line and multi-line declarations as needed.
29-
- Multi-line array declarations require [Bicep CLI](./install.md#visual-studio-code-and-bicep-extension) version 0.7.X or later.
30-
3121
```bicep
3222
var multiLineArray = [
3323
'abc'
@@ -41,6 +31,11 @@ var mixedArray = ['abc', 'def'
4131
'ghi']
4232
```
4333

34+
- **Single-line arrays** use commas (`,`) to separate values.
35+
- **Multi-line arrays** don't use commas between values.
36+
- You can mix single-line and multi-line declarations as needed.
37+
- Multi-line array declarations require [Bicep CLI version 0.7.X or later](](https://github.com/Azure/bicep/releases/tag/v0.7.4)).
38+
4439
Each array element can be of any type. Arrays can be:
4540

4641
- **Homogeneous** (all elements of the same type)

articles/azure-resource-manager/bicep/operators-access.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,13 @@ Output from the example:
7373

7474
Beginning with [Bicep CLI version 0.34.x](https://github.com/Azure/bicep/releases/tag/v0.34.1), the reverse index accessor operator (`^`) allows you to retrieve an element from an array or a character from a string by counting from the end. This one-based index means `^1` returns the last item, `^2` the second-to-last, and so on. The index must be a positive integer greater than zero and can be specified as a literal or an expression that evaluates to an integer.
7575

76-
```bicep
77-
array[^index]
78-
string[^index]
79-
```
76+
`array[^index]`
77+
78+
`string[^index]`
8079

81-
### Remarks
80+
If the index exceeds the length of the array or string, a compilation error occurs for static indices, or a runtime error occurs for dynamic indices.
8281

83-
- The reverse index operator provides a convenient way to access elements or characters from the end of a sequence without calculating its length.
84-
- The index must be at least 1. Using `^0` results in a compilation error.
85-
- If the index exceeds the length of the array or string, a compilation error occurs for static indices, or a runtime error occurs for dynamic indices.
86-
- For constant arrays or strings, the operator is evaluated at compile time. For dynamic inputs, such as [parameters](./parameters.md), evaluation occurs at deployment time.
82+
For constant arrays or strings, the operator is evaluated at compile time. For dynamic inputs, such as [parameters](./parameters.md), evaluation occurs at deployment time.
8783

8884
### Example
8985

0 commit comments

Comments
 (0)