Interactive help: Difference between revisions

Content added Content deleted
m (syntax highlighting fixup automation)
Line 9: Line 9:


=={{header|AWK}}==
=={{header|AWK}}==
<syntaxhighlight lang="awk">
<lang AWK>
# syntax: GAWK --help
# syntax: GAWK --help
</syntaxhighlight>
</lang>
{{out}}
{{out}}
<pre>
<pre>
Line 329: Line 329:
=={{header|Julia}}==
=={{header|Julia}}==
When Julia is run without a program file as argument, the REPL (Read-Evaluate-Print Loop) runs. Entering a ? at the prompt brings up help, with help on a specific topic obtained if the topic name is preceded by ? at the prompt.
When Julia is run without a program file as argument, the REPL (Read-Evaluate-Print Loop) runs. Entering a ? at the prompt brings up help, with help on a specific topic obtained if the topic name is preceded by ? at the prompt.
<lang julia>
<syntaxhighlight lang="julia">


> julia
> julia
Line 372: Line 372:
The use of the return keyword is exactly the same as in other languages, but is often optional. A function without
The use of the return keyword is exactly the same as in other languages, but is often optional. A function without
an explicit return statement will return the last expression in the function body.
an explicit return statement will return the last expression in the function body.
</syntaxhighlight>
</lang>


=={{header|Nim}}==
=={{header|Nim}}==
Line 853: Line 853:
Individual Raku scripts are to some extent self-documenting. If the script has a MAIN sub, and it is called with improper parameters, it will display an automatically generated help message showing the various possible parameters, which are required, which are optional, and what type each takes:
Individual Raku scripts are to some extent self-documenting. If the script has a MAIN sub, and it is called with improper parameters, it will display an automatically generated help message showing the various possible parameters, which are required, which are optional, and what type each takes:


<lang perl6>sub MAIN(
<syntaxhighlight lang="raku" line>sub MAIN(
Str $run, #= Task or file name
Str $run, #= Task or file name
Str :$lang = 'raku', #= Language, default raku
Str :$lang = 'raku', #= Language, default raku
Line 860: Line 860:
) {
) {
# do whatever
# do whatever
}</lang>
}</syntaxhighlight>


{{out|When saved locally as main.raku and invoked with no (or wrong) passed parameters}}
{{out|When saved locally as main.raku and invoked with no (or wrong) passed parameters}}