> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chaintable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 进阶功能

> 在 Function 中调用已有 Function，传递参数并处理返回值。

将多个计算流程共用的逻辑保存为 Function，可以通过完整 Function ID 复用。调用方传入参数，等待结果，再继续计算。

## 调用已有 Function

先完成[创建 Function](/zh/guides/functions/create)，保存 `demo.usdc_amount`。然后在同一 Space 新建 `usdc_value`，填入以下代码：

```python theme={null}
def _():
    from blockx import function

    amount = function.call('demo.usdc_amount', 1500000)
    return {'amount': amount, 'symbol': 'USDC'}
```

本例不需要添加参数。保存并点击 **Run**，返回：

```json theme={null}
{"amount": 1.5, "symbol": "USDC"}
```

<Frame>
  <img src="https://mintcdn.com/opcodelabspteltd/TOA0bb8_WqdBuVVN/images/guides/functions/reuse.png?fit=max&auto=format&n=TOA0bb8_WqdBuVVN&q=85&s=c0e67b3b22f78e8a465bc17fc380b8ec" alt="usdc_value 调用已有 Function，返回金额和代币符号" width="1920" height="1080" data-path="images/guides/functions/reuse.png" />
</Frame>

`function.call()` 的第一个参数是 Function ID，后续参数按位置传给被调用函数。返回值就是被调用函数的结果。

## 传递多个参数

例如，被调用函数的入口是 `def _(address, block_id)`，调用时就按这个顺序传入地址和区块 ID。不要把两个参数包装成一个列表，除非被调用函数本身只接收一个列表参数。

跨 Space 调用时也使用完整 ID，并确保当前账户具有所需的访问权限。调用会使用该 Function 已保存的代码，编辑后要先保存。
