Exported source modules
ASPL 0.7.0 · Current release
Download an entry and helper that export a record and return a private helper as a callable.
On this page
Purpose and preparation
Native only, ASPL 0.7.0. Download the entry and the required helpers.aspl for English or مساعدات.لبات for Arabic into one directory. No input lines or data assets are required. The helper exports a function, a record and a function returning a private helper as a callable. Prints 42 followed by LF and returns 0.
Install the native toolchain · Follow the practical module guide.
Arabic source
Native only. These are source files, not browser run data.
Execution: Native only · ASPL 0.7.0
- Native only. Keep الرئيسية.لبات or main.aspl beside helpers.aspl in one directory. No data files are required.
Input: No input lines are required.
Arabic source · Required source modules, keep each variant in a separate directory:
استورد مساعدات.لبات بسم مكتبة.
دالة ابدأ_الرئيسية() -> ص64 {
دع جواب: مكتبة::سجل_جواب = مكتبة::سجل_جواب { قيمة: 38 }.
دع عمل: دالة(ص64) -> ص64 = مكتبة::اختر().
إذا عمل(جواب::قيمة) لا يطابق مكتبة::جواب() { أرجع 1. }
اطبع(نسق_ص64(عمل(جواب::قيمة)) + "\س").
أرجع 0.
}
Follow the Linux instructions to run this example. Download the source to keep a copy.
Download الرئيسية.لباتExpected outcomes
{
"native": {
"check": 0,
"status": 0,
"output": "42\n"
}
}English source
Native only. These are source files, not browser run data.
Execution: Native only · ASPL 0.7.0
- Native only. Keep الرئيسية.لبات or main.aspl beside helpers.aspl in one directory. No data files are required.
Input: No input lines are required.
English source · Required source modules, keep each variant in a separate directory:
import helpers.aspl as lib;
fn start_main() -> i64 {
let reply: lib::Reply = lib::Reply { value: 38 };
let action: fn(i64) -> i64 = lib::choose();
if action(reply::value) not matches lib::answer() { return 1; }
print(format_i64(action(reply::value)) + "\n");
return 0;
}
Follow the Linux instructions to run this example. Download the source to keep a copy.
Download main.asplExpected outcomes
{
"native": {
"check": 0,
"status": 0,
"output": "42\n"
}
}Check the result
Source cards show exact catalog outcomes. Downloads retain original bytes, digests and supplied vocabulary.
aspl check main.aspl
aspl run main.aspl
aspl build -o module-program main.aspl
./module-program