diff options
Diffstat (limited to 'awk/rawk/scratch/debug_simple.awk')
-rw-r--r-- | awk/rawk/scratch/debug_simple.awk | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/awk/rawk/scratch/debug_simple.awk b/awk/rawk/scratch/debug_simple.awk new file mode 100644 index 0000000..3dc36a5 --- /dev/null +++ b/awk/rawk/scratch/debug_simple.awk @@ -0,0 +1,40 @@ +# Generated by rawk v2.0.0 +# Source: simple_stdlib_test.rawk + +# --- Standard Library --- +function is_number(value) { return value == value + 0 } +function is_string(value) { return !(value == value + 0) } + +function get_keys(array, result, i, count) { count = 0; for (i in array) { result[++count] = i }; return count } + + +# --- User Functions --- +function test_email(email) { return is_email(email); + +} + +# --- Main Script --- +BEGIN { + print "=== Simple Standard Library Test ===" +} + +} + +{ + # Test email validation + result = test_email("user@example.com"); + print "Email test result:", result; + + # Test direct function calls + print "is_number(42):", is_number(42); + print "is_string('hello'):", is_string("hello"); + + print "Test completed"; + exit 0; +} + +# Rawk compilation summary: +# - Rawk Version: 2.0.0 +# - Functions defined: 1 +# - Source lines: 22 +# - Standard library functions included: 2 |