> For the complete documentation index, see [llms.txt](https://docs.r.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r.xyz/glider-ide/api/instruction/instruction.next_instruction.md).

# Instruction.next\_instruction()

`next_instruction() →` [`APISet`](/glider-ide/api/iterables/apiset.md)`[`[`Instruction`](/glider-ide/api/instruction.md)`]`

The difference between the next\_instruction() function and [next\_instructions()](/glider-ide/api/instruction/instruction.next_instructions.md) is that this function will return a list of instructions that are immediately following the current instruction in the CFG (control-flow-graph).

*The function operates non-recursively, meaning it works intra-procedurally.*

For example, in the function:

```solidity
function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath: addition overflow");

    return c;
  }
```

for the instruction:&#x20;

```solidity
uint256 c = a + b;
```

the function will return the instruction:

```solidity
require(c >= a, "SafeMath: addition overflow");
```

## Query Example

```python
from glider import *
def query():
  instructions = Functions().with_name("sub").exec(1,1).instructions().exec(1,1)

  return instructions + instructions[0].next_instruction()
```

## Example Output

<figure><img src="/files/pE9gKNCQjCvG35bpvp4N" alt=""><figcaption></figcaption></figure>
