> For the complete documentation index, see [llms.txt](https://hyundai-robotics.gitbook.io/hi6-robot-language/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hyundai-robotics.gitbook.io/hi6-robot-language/rl-english/flowcontrol-subprogram/call-jump/call.md).

# 3.7.1 call

### Description

There is no significant difference in format between the main program and the subprogram in HRScript. The first job executed by the start button or by a signal is the main program, and all other jobs called by the **call** statement are subprograms.&#x20;

### Syntax&#xD;

```python
call <job number or file name> [,parameter 1,parameter 2,…]
```

Specify the job number of the job file name (excluding the extension) after the **call** statement. Then, while program A is being executed, if call B is encountered, A’s execution will be stopped, and the first statement of program B, a subprogram, will continue to be executed. If the **end** statement is encountered while B is being executed, program A’s execution will continue upon returning to the position of the next statement of program A’s **call** statement that was previously called.

### Example&#xD;

The following shows an example and the result of a subprogram called by a **call** statement. It seems meaningless to divide the program into two because the subprogram must handle only one print statement. However, a more practical example will be shown later.

|          |                           |
| -------- | ------------------------- |
| 0001.job | <p>print "main job start" |

</p><p>call 102_err</p><p>print "main job end"</p><p>end</p> |
| 0102\_err.job | <p>print "sub-program"</p><p>end</p>                                                    |
| Result        | <p>main job start</p><p>sub-program</p><p>main job end</p>                             |
