# Blocks and Connections

## Block

A Block is the IDE (Integrated Development Environment) for the coding. Though it is similar to other IDEs yet it has the luxury of executing the codes hassle-free.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FXsPyOla1pHJosR8mtBdA%2FScreen%20Recording%202025-03-25%20at%201.13.27%E2%80%AFPM.mp4?alt=media&token=5b6818be-cdb9-4798-9d84-bf624553c805>" %}
Blocks
{% endembed %}

## Auto naming blocks

Auto-naming of the block typically refers to generating meaningful names for variables, functions, classes, or other elements in your code automatically, often based on specific rules or patterns. This can help improve code readability and maintainability.

<figure><img src="/files/0kN98m01ZQlf8q7TdqfT" alt=""><figcaption><p>Auto naming</p></figcaption></figure>

## Connection

Although the blocks are independent, a connection can be established between them through the connection portal (yellow dot on both sides) of each block. This will let the user access the components of connected blocks such as variables, libraries, functions, classes, etc. to use in other blocks.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FdWINUiaKCY8ztnYyISo3%2FScreen%20Recording%202025-03-25%20at%201.26.42%E2%80%AFPM.mp4?alt=media&token=3afbe475-4fe1-4608-a831-2f0d2052e0df>" %}
Connection
{% endembed %}

## **Display Block Name in Zoom Out**

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2F0x39HFCdx877IaOADSOW%2FScreen%20Recording%202025-03-25%20at%201.30.37%E2%80%AFPM.mp4?alt=media&token=64fb34d5-6e2e-4521-acc6-21d8d16c3786>" %}
Display name while zoomed out
{% endembed %}

## Block Split

In programming and code execution, it is often necessary to control the flow of instructions by using blocks of code. These blocks can be thought of as self-contained units of logic that perform specific tasks or operations. Sometimes, it is desirable to split a block into two separate blocks while ensuring that the last active line of the original block is passed on to the subsequent blocks.

By ensuring that the last active line is seamlessly transitioned to the subsequent blocks, developers can build more modular and maintainable code, which is crucial for large and complex software projects. However, it's worth noting that in some cases, when there's only one line in the block, splitting it may leave the first block empty.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2F2XPGyKkIkt5hrDG1nxg7%2FScreen%20Recording%202025-03-25%20at%202.04.33%E2%80%AFPM.mp4?alt=media&token=37c89728-4441-4ac6-a46c-8e6430d89689>" %}
Block Split
{% endembed %}

## Lint Code

Lint code option can be used to clean up your code.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FuI3VmDRZnT7QhG5GvFKu%2FLint.mp4?alt=media&token=984e0074-75ea-415b-9231-0cbb77999d75>" %}
Lint Code
{% endembed %}

## Zoom Block

You can Zoom into your active block by following the steps as shown in video

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2Fx9HUAqERJ0LZJOiOgXn8%2FZoom.mp4?alt=media&token=9ed59502-978b-4717-b90a-ea0ae033e6e4>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zerve.ai/guide/canvas-view/blocks-and-connections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
