Print a line through puts
ASPL 0.7.0 · Current release
Call the string adapter, print مرحبا plus LF, and check the C return before exiting.
On this page
Purpose and preparation
Native only, ASPL 0.7.0 on x86-64 Linux with glibc. Requires libc.so.6 with puts. No input lines, source modules or data assets. The library adds LF after مرحبا. The program handles a negative C result and otherwise exits with 0.
Native installation · C guide · Foreign API · C collection.
Arabic source
Native only. Download this supplied variant unchanged.
Execution: Native only · ASPL 0.7.0
- Native only. ASPL 0.7.0, x86-64 Linux with glibc; requires libc.so.6 and puts. No source modules or data assets.
Input: No input lines are required.
غير_آمن خارجي اطبع_سطر(رسالة: نص) -> ص64
= سي_صحيح__مؤشر_محرف_ثابت("libc.so.6", "puts").
دالة ابدأ_الرئيسية() -> ص64 {
دع النتيجة = غير_آمن اطبع_سطر("مرحبا").
إذا النتيجة < 0 { أرجع 1. }
أرجع 0.
}
Follow the Linux instructions to run this example. Download the source to keep a copy.
Download طباعة-سي.لباتExpected outcomes
{
"browser": {
"check": "policy-rejection",
"class": "policy-rejection",
"reason": "foreign-imports-not-supported",
"output": ""
},
"native": {
"check": 0,
"status": 0,
"output": "مرحبا\n"
}
}English source
Native only. Download this supplied variant unchanged.
Execution: Native only · ASPL 0.7.0
- Native only. ASPL 0.7.0, x86-64 Linux with glibc; requires libc.so.6 and puts. No source modules or data assets.
Input: No input lines are required.
unsafe foreign print_line(message: string) -> i64
= c_int__const_char_ptr("libc.so.6", "puts");
fn start_main() -> i64 {
let result_value = unsafe print_line("مرحبا");
if result_value < 0 { return 1; }
return 0;
}
Follow the Linux instructions to run this example. Download the source to keep a copy.
Download puts.asplExpected outcomes
{
"browser": {
"check": "policy-rejection",
"class": "policy-rejection",
"reason": "foreign-imports-not-supported",
"output": ""
},
"native": {
"check": 0,
"status": 0,
"output": "مرحبا\n"
}
}Check the result
Source cards show exact catalog outcomes, original downloads, digests and supplied vocabulary. A nonzero example return indicates a failed assertion or handled library failure.
aspl check puts.aspl
aspl run puts.aspl
aspl build -o puts-program puts.aspl
./puts-program