Check exact aliases, identity and literal bytes
ASPL 0.7.0 · Current release
Check exact aliases, identity and literal bytes
On this page
Prepare the native host
Native only, published ASPL 0.7.0.
Raylib guide · API · Installation · Deployment.
Native ASPL 0.7.0 on x86_64 Linux with glibc 2.34 or later.
No display, audio device, upstream, asset files or source modules. Shaped measurement uses embedded licensed fonts; the unsafe abs call uses the baseline libc.so.6.
Page language and source vocabulary are independent. Keep original filenames; no translated user source is generated. Each source panel shows its checked expected behavior.
Arabic source
Execution: Native only · ASPL 0.7.0
- Native ASPL 0.7.0 on x86_64 Linux with glibc 2.34 or later.
- No display, audio device, upstream, asset files or source modules. Shaped measurement uses embedded licensed fonts; the unsafe abs call uses the baseline system C library.
Input: No input lines are required.
استورد أساسي::رايليب.
استورد أساسي::ويب.
غير_آمن خارجي مطلق(رقم: ص32) -> ص32 = سي("libc.so.6", "abs").
// أسماء المستخدم وحقول السجل عربية. تبقى المسارات والقيم الحرفية كما كتبت.
سجل أصل { اسم_الملف: نص, محفوظ_حرفيا: نص }
دالة ابدأ_الرئيسية() -> ص64 {
إذا غير_آمن مطلق(-7) لا يطابق 7 { أرجع 11. }
دع الأصل = أصل { اسم_الملف: "docs/examples/assets/raylib-sprites.png", محفوظ_حرفيا: "مسار/é.png\صA" }.
إذا الأصل::اسم_الملف لا يطابق "docs/examples/assets/raylib-sprites.png" { أرجع 1. }
إذا الأصل::محفوظ_حرفيا لا يطابق "مسار/e\ي{0301}.png\صA" { أرجع 2. }
دع أ: رايليب::متجه2 = رايليب::متجه2 { س: 1.25, ص: 2.5 }.
دع ب: رايليب::متجه2 = رايليب::متجه2 { س: أ::س, ص: أ::ص }.
إذا ب::س لا يطابق 1.25 أو ب::ص لا يطابق 2.5 { أرجع 3. }
دع مفتاح: رايليب::مفتاح = رايليب::مفتاح_مسافة.
إذا مفتاح لا يطابق رايليب::مفتاح_مسافة { أرجع 4. }
دع أعلام = رايليب::علم_نافذة_قابلة_للتحجيم | رايليب::علم_تلميح_تزامن_رأسي.
إذا أعلام لا يطابق رايليب::علم_نافذة_قابلة_للتحجيم | رايليب::علم_تلميح_تزامن_رأسي { أرجع 5. }
دع ميزانية: ويب::ميزانية_تقدم = ويب::ميزانية_التقدم().
إذا ميزانية::حد_التعليمات لا يطابق 4096 { أرجع 6. }
دع خط = رايليب::الخط_الافتراضي().
إذا لا خط::نجاح { اطبع(خط::الخطأ::الرسالة). أرجع 7. }
دع إنجليزي = رايليب::قس_النص_موسعا(خط::قيمة, "سلام ASPL 123", 32.0, 0.0).
دع عربي = رايليب::قس_النص_موسعا(خط::قيمة, "سلام ASPL 123", 32.0, 0.0).
إذا لا إنجليزي::نجاح أو لا عربي::نجاح { أرجع 8. }
إذا إنجليزي::قيمة::س لا يطابق عربي::قيمة::س { أرجع 9. }
دع غير_صالح = رايليب::قس_النص("bad\تtext", 32).
إذا غير_صالح::نجاح أو غير_صالح::الخطأ::الرمز لا يطابق "raylib.invalid_text" { أرجع 10. }
اطبع(غير_صالح::الخطأ::الرسالة). اطبع("\س").
اطبع(الأصل::اسم_الملف). اطبع("\س").
اطبع(الأصل::محفوظ_حرفيا). اطبع("\سidentity and literals complete\س").
أرجع 0.
}
Follow the Linux instructions to run this example. Download the source to keep a copy.
Download أسماء-وقيم-حرفية.لباتExpected outcomes
{
"native": {
"check": 0,
"status": 0,
"behavior": {
"en": "Runs headlessly with status 0. It prints the bilingual invalid-tab diagnostic with the tab's zero-based scalar position and Unicode value, a literal PNG path, decomposed e plus U+0301 and an actual NUL before A, then identity and literals complete. The path is never opened. All supplied variants have identical output bytes.",
"ar": "يعمل دون أجهزة بحالة 0. يطبع رسالة الجدولة غير الصالحة باللغتين مع موضع محرف الجدولة من الصفر وقيمة Unicode له، ومسار PNG نصيا، وe مفككة مع U+0301 وNUL فعلية قبل A، ثم identity and literals complete. لا يفتح المسار. لكل الصيغ الموردة بايتات إخراج متطابقة."
},
"output": "Text input is invalid. مدخل النص غير صالح. MeasureText: text.input: scalar_index=3 scalar=U+0009.\ndocs/examples/assets/raylib-sprites.png\nمسار/é.png\u0000A\nidentity and literals complete\n"
}
}English source
Execution: Native only · ASPL 0.7.0
- Native ASPL 0.7.0 on x86_64 Linux with glibc 2.34 or later.
- No display, audio device, upstream, asset files or source modules. Shaped measurement uses embedded licensed fonts; the unsafe abs call uses the baseline system C library.
Input: No input lines are required.
import core::raylib;
import core::http;
unsafe foreign absolute(number: i32) -> i32 = c("libc.so.6", "abs");
// User identifiers and record fields keep their own names in all three files.
record Asset { filename: string, untouched: string }
fn start_main() -> i64 {
if unsafe absolute(-7) not matches 7 { return 11; }
let asset = Asset { filename: "docs/examples/assets/raylib-sprites.png", untouched: "مسار/é.png\0A" };
if asset::filename not matches "docs/examples/assets/raylib-sprites.png" { return 1; }
if asset::untouched not matches "مسار/e\u{0301}.png\0A" { return 2; }
let a: raylib::Vector2 = raylib::Vector2 { x: 1.25, y: 2.5 };
let b: raylib::Vector2 = raylib::Vector2 { x: a::x, y: a::y };
if b::x not matches 1.25 or b::y not matches 2.5 { return 3; }
let key: raylib::Key = raylib::KEY_SPACE;
if key not matches raylib::KEY_SPACE { return 4; }
let flags = raylib::FLAG_WINDOW_RESIZABLE | raylib::FLAG_VSYNC_HINT;
if flags not matches raylib::FLAG_WINDOW_RESIZABLE | raylib::FLAG_VSYNC_HINT { return 5; }
let budget: http::ProgressBudget = http::progress_budget();
if budget::max_instructions not matches 4096 { return 6; }
let font = raylib::GetFontDefault();
if not font::ok { print(font::error::message); return 7; }
let english = raylib::MeasureTextEx(font::value, "سلام ASPL 123", 32.0, 0.0);
let arabic = raylib::MeasureTextEx(font::value, "سلام ASPL 123", 32.0, 0.0);
if not english::ok or not arabic::ok { return 8; }
if english::value::x not matches arabic::value::x { return 9; }
let invalid = raylib::MeasureText("bad\ttext", 32);
if invalid::ok or invalid::error::code not matches "raylib.invalid_text" { return 10; }
print(invalid::error::message); print("\n");
print(asset::filename); print("\n");
print(asset::untouched); print("\nidentity and literals complete\n");
return 0;
}
Follow the Linux instructions to run this example. Download the source to keep a copy.
Download identity-literals.asplExpected outcomes
{
"native": {
"check": 0,
"status": 0,
"behavior": {
"en": "Runs headlessly with status 0. It prints the bilingual invalid-tab diagnostic with the tab's zero-based scalar position and Unicode value, a literal PNG path, decomposed e plus U+0301 and an actual NUL before A, then identity and literals complete. The path is never opened. All supplied variants have identical output bytes.",
"ar": "يعمل دون أجهزة بحالة 0. يطبع رسالة الجدولة غير الصالحة باللغتين مع موضع محرف الجدولة من الصفر وقيمة Unicode له، ومسار PNG نصيا، وe مفككة مع U+0301 وNUL فعلية قبل A، ثم identity and literals complete. لا يفتح المسار. لكل الصيغ الموردة بايتات إخراج متطابقة."
},
"output": "Text input is invalid. مدخل النص غير صالح. MeasureText: text.input: scalar_index=3 scalar=U+0009.\ndocs/examples/assets/raylib-sprites.png\nمسار/é.png\u0000A\nidentity and literals complete\n"
}
}Mixed source
Execution: Native only · ASPL 0.7.0
- Native ASPL 0.7.0 on x86_64 Linux with glibc 2.34 or later.
- No display, audio device, upstream, asset files or source modules. Shaped measurement uses embedded licensed fonts; the unsafe abs call uses the baseline system C library.
Input: No input lines are required.
import core::raylib;
استورد أساسي::رايليب.
import core::http;
استورد أساسي::ويب.
unsafe foreign absolute(number: i32) -> i32 = c("libc.so.6", "abs");
// User identifiers and record fields keep their own names in all three files.
record Asset { filename: string, untouched: string }
fn start_main() -> i64 {
if unsafe absolute(-7) not matches 7 { return 11; }
let asset = Asset { filename: "docs/examples/assets/raylib-sprites.png", untouched: "مسار/é.png\0A" };
if asset::filename not matches "docs/examples/assets/raylib-sprites.png" { return 1; }
if asset::untouched not matches "مسار/e\u{0301}.png\0A" { return 2; }
let a: raylib::Vector2 = رايليب::متجه2 { س: 1.25, ص: 2.5 };
let b: رايليب::متجه2 = raylib::Vector2 { x: a::س, y: a::y };
if b::x not matches 1.25 or b::ص not matches 2.5 { return 3; }
let key: رايليب::مفتاح = raylib::KEY_SPACE;
if key not matches رايليب::مفتاح_مسافة { return 4; }
let flags = رايليب::علم_نافذة_قابلة_للتحجيم | raylib::FLAG_VSYNC_HINT;
if flags not matches raylib::FLAG_WINDOW_RESIZABLE | رايليب::علم_تلميح_تزامن_رأسي { return 5; }
let budget: ويب::ميزانية_تقدم = http::progress_budget();
if budget::حد_التعليمات not matches 4096 { return 6; }
let font = raylib::GetFontDefault();
if not font::ok { print(font::error::message); return 7; }
let english = raylib::MeasureTextEx(font::value, "سلام ASPL 123", 32.0, 0.0);
let arabic = رايليب::قس_النص_موسعا(font::value, "سلام ASPL 123", 32.0, 0.0);
if not english::ok or not arabic::ok { return 8; }
if english::value::x not matches arabic::value::س { return 9; }
let invalid = raylib::MeasureText("bad\ttext", 32);
if invalid::ok or invalid::error::code not matches "raylib.invalid_text" { return 10; }
print(invalid::error::message); print("\n");
print(asset::filename); print("\n");
print(asset::untouched); print("\nidentity and literals complete\n");
return 0;
}
Follow the Linux instructions to run this example. Download the source to keep a copy.
Download identity-literals.mixed.asplExpected outcomes
{
"native": {
"check": 0,
"status": 0,
"behavior": {
"en": "Runs headlessly with status 0. It prints the bilingual invalid-tab diagnostic with the tab's zero-based scalar position and Unicode value, a literal PNG path, decomposed e plus U+0301 and an actual NUL before A, then identity and literals complete. The path is never opened. All supplied variants have identical output bytes.",
"ar": "يعمل دون أجهزة بحالة 0. يطبع رسالة الجدولة غير الصالحة باللغتين مع موضع محرف الجدولة من الصفر وقيمة Unicode له، ومسار PNG نصيا، وe مفككة مع U+0301 وNUL فعلية قبل A، ثم identity and literals complete. لا يفتح المسار. لكل الصيغ الموردة بايتات إخراج متطابقة."
},
"output": "Text input is invalid. مدخل النص غير صالح. MeasureText: text.input: scalar_index=3 scalar=U+0009.\ndocs/examples/assets/raylib-sprites.png\nمسار/é.png\u0000A\nidentity and literals complete\n"
}
}Commands and outcomes
Check/build acquire no device. Run from the directory containing the prepared docs/ tree. Keep the generated .THIRD-PARTY-NOTICES companion when distributing the ELF.
ar:
aspl check docs/examples/raylib/أسماء-وقيم-حرفية.لبات
aspl run docs/examples/raylib/أسماء-وقيم-حرفية.لبات
aspl build -o raylib-identity-literals-ar-program docs/examples/raylib/أسماء-وقيم-حرفية.لبات
./raylib-identity-literals-ar-programen:
aspl check docs/examples/raylib/identity-literals.aspl
aspl run docs/examples/raylib/identity-literals.aspl
aspl build -o raylib-identity-literals-en-program docs/examples/raylib/identity-literals.aspl
./raylib-identity-literals-en-programmixed:
aspl check docs/examples/raylib/identity-literals.mixed.aspl
aspl run docs/examples/raylib/identity-literals.mixed.aspl
aspl build -o raylib-identity-literals-mixed-program docs/examples/raylib/identity-literals.mixed.aspl
./raylib-identity-literals-mixed-program