Skip to main content
Log in

Mojo function

external_call

external_call[callee: StringLiteral, return_type: AnyTrivialRegType, *types: AnyType](*args: *types) -> return_type

Calls an external function.

Parameters:

  • callee (StringLiteral): The name of the external function.
  • return_type (AnyTrivialRegType): The return type.
  • *types (AnyType): The argument types.

Args:

  • *args (*types): The arguments to pass to the external function.

Returns:

The external call result.

external_call[callee: StringLiteral, return_type: AnyTrivialRegType](args: VariadicPack[origin, AnyType, element_types]) -> return_type

Calls an external function.

Parameters:

  • callee (StringLiteral): The name of the external function.
  • return_type (AnyTrivialRegType): The return type.

Args:

  • args (VariadicPack[origin, AnyType, element_types]): The arguments to pass to the external function.

Returns:

The external call result.