Native shebang: Difference between revisions

Line 530:
 
=={{header|langur}}==
Langur uses a hash mark to start single line comments, so a shebang is not a problem, as the compiler will ignore it.
The _args system variable contains an array of strings of all arguments passed. Langur uses 1-based indexing.
 
The example below uses the string "nothing passed in" as an alternate result for a bad index.
 
'''File: echo.langur'''
<lang langur>#!/usr/bin/langur
writeln _args[1;join "nothing passed in"], _args</lang>
 
'''Usage:'''
<pre>./echo.langur "hello, peeps!"</pre>
 
{{out}}
890

edits