Skip to content

Files

Latest commit

 

History

History
23 lines (14 loc) · 472 Bytes

SC2321.md

File metadata and controls

23 lines (14 loc) · 472 Bytes

Pattern: Use of extra $((..))

Issue: -

Description

In indexed arrays (but not associative ones), the array index is already an arithmetic context. There is no point or value in wrapping it in an additional, explicit $((..)).

Example of incorrect code:

values[$((i+1))]=1

Example of correct code:

values[i+1]=1

Further Reading