Quickstart¶
Get started quickly with FTP_CALCULATOR in Rust, Python, and Excel.
With Python¶
1. Import the module¶
2. Use the functions¶
# Addition
result = add(10, 20)
print(result) # Prints 30
# Safe division
result = safe_divide(10, 2)
print(result) # Prints 5
# Error handling
result = safe_divide(10, 0)
print(result) # Prints -1 (error)
3. Advanced example¶
from ftp_core_python import MonWrapper
wrapper = MonWrapper()
print(wrapper.fonction_etendue(5)) # Prints 15 (5 + 10)
With Excel¶
1. Load the add-in¶
- Open Excel and load
TonAddIn.xll(see Installation).
2. Use the functions¶
| Excel Function | Description | Example |
|---|---|---|
=RustAdd(a, b) |
Adds two integers. | =RustAdd(2, 3) |
=RustDivide(a, b) |
Divides two integers. | =RustDivide(10, 2) |
3. Example¶
With Rust (directly)¶
1. Add ftp_core as a dependency¶
In your Cargo.toml: