Interactive help: Difference between revisions

m
→‎{{header|Wren}}: Version change.
m (→‎{{header|REXX}}: added wording to the REXX section header.)
m (→‎{{header|Wren}}: Version change.)
 
(4 intermediate revisions by 4 users not shown)
Line 1:
{{draft task}}
 
 
;Task:
Demonstrate any interactive (or command line) help offered by the language implementation.
 
Line 7 ⟶ 9:
 
=={{header|AWK}}==
<syntaxhighlight lang="awk">
<lang AWK>
# syntax: GAWK --help
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 52 ⟶ 54:
gawk '{ sum += $1 }; END { print sum }' file
gawk -F: '{ print $1 }' /etc/passwd
</langpre>
 
=={{header|Common Lisp}}==
Common Lisp supports several interactive features for exploring the language and runtime. The built-in functions [http://www.lispworks.com/documentation/lw71/CLHS/Body/f_docume.htm <code>documentation</code>] and [http://clhs.lisp.se/Body/f_descri.htm#describe <code>describe</code>] will both present information on objects in the system.
{{out}}
<pre>
CL-USER> (describe #'char-code)
#<FUNCTION CHAR-CODE>
[compiled function]
 
 
Lambda-list: (CHAR)
Declared type: (FUNCTION (CHARACTER) (VALUES (MOD 1114112) &OPTIONAL))
Documentation:
Return the integer code of CHAR.
Known attributes: foldable, flushable, unsafely-flushable, movable
Source file: SYS:SRC;CODE;TARGET-CHAR.LISP
; No value
CL-USER> (documentation #'char-code 'function)
"Return the integer code of CHAR."
</pre>
 
Line 89 ⟶ 111:
 
Additionally, by pressing <code>F1</code> in the listener, you can access the help browser, an offline version of [https://docs.factorcode.org/content/article-handbook.html Factor's documentation]. Factor's help browser interfaces with the listener in various ways. For example, pressing <code>ctrl+h</code> while the cursor is over a word will take you to that word's documentation. Running <code>"sequences" about</code> in the listener will take you to the documentation for the <code>sequences</code> vocabulary.
 
 
=={{header|FreeBASIC}}==
Line 308 ⟶ 329:
=={{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.
<langsyntaxhighlight lang="julia">
 
> julia
Line 351 ⟶ 372:
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.
</syntaxhighlight>
</lang>
 
=={{header|Nim}}==
Line 792 ⟶ 813:
See docs\phix\phix.chm for the complete manual, or [http://phix.x10.mx/docs/html/phix.htm online].<br>
When p -?, p -h, p -help, or p --help is entered:
<!--(notonline)-->
<pre>
interpret: <filename>
Line 810 ⟶ 832:
Phix hybrid interpreter/compiler.
 
Version 1.0.8.02 (32 bit Windows) Copyright Pete Lomax 2006..20162022
 
Enter ? for options or filename to execute:
Line 831 ⟶ 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:
 
<syntaxhighlight lang="raku" perl6line>sub MAIN(
Str $run, #= Task or file name
Str :$lang = 'raku', #= Language, default raku
Line 838 ⟶ 860:
) {
# do whatever
}</langsyntaxhighlight>
 
{{out|When saved locally as main.raku and invoked with no (or wrong) passed parameters}}
Line 968 ⟶ 990:
 
$ wren_cli --version
wren 0.34.0
</pre>
 
 
=={{header|Yabasic}}==
9,479

edits