<p>idx = index, as in the index of an array/list or similar data structure, usually (and in most cases such as this one) an index is zero-based, meaning the first element of the array has an index of <code>0</code>, the second has an index of <code>1</code>, and so on.</p>

CC BY-SA 3.0
2017-11-03T13:24:23.743Z
2017-11-03T13:24:23.743Z
Eric Allam
<p><code>idx</code> is an integer in source code of bitcoin related softwares.</p>

<p><a href="https://github.com/decred/atomicswap/blob/70f795e/cmd/btcatomicswap/main.go#L391" rel="nofollow noreferrer">https://github.com/decred/atomicswap/blob/70f795e/cmd/btcatomicswap/main.go#L391</a></p>

<p><a href="https://github.com/btcsuite/btcd/blob/efa50e6abc7a9be4478e44216a0677efa8fdf4ce/txscript/stack.go#L108" rel="nofollow noreferrer">https://github.com/btcsuite/btcd/blob/efa50e6abc7a9be4478e44216a0677efa8fdf4ce/txscript/stack.go#L108</a></p>

<p><a href="https://github.com/bitcoin/bitcoin/blob/aa624b61c928295c27ffbb4d27be582f5aa31b56/src/qt/bitcoinaddressvalidator.cpp#L32" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/aa624b61c928295c27ffbb4d27be582f5aa31b56/src/qt/bitcoinaddressvalidator.cpp#L32</a></p>

<p>What does <code>idx</code> stand for?</p>

<terminology><source-code>
Definition of `Idx`
MCCCS
# Definition of `Idx`

(Asked by: username_0 on 2017-11-03)

`idx` is an integer in source code of bitcoin related softwares.

<https://github.com/decred/atomicswap/blob/70f795e/cmd/btcatomicswap/main.go#L391>

<https://github.com/btcsuite/btcd/blob/efa50e6abc7a9be4478e44216a0677efa8fdf4ce/txscript/stack.go#L108>

<https://github.com/bitcoin/bitcoin/blob/aa624b61c928295c27ffbb4d27be582f5aa31b56/src/qt/bitcoinaddressvalidator.cpp#L32>

What does `idx` stand for?

**Tags:** terminology, source-code


---

## 1 answers

### Answer by username_1 on 2017-11-03. Score: 2 | Accepted answer

idx = index, as in the index of an array/list or similar data structure, usually (and in most cases such as this one) an index is zero-based, meaning the first element of the array has an index of `0`, the second has an index of `1`, and so on.


---

