mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
use explicit ./scriptname to help novice users
This commit is contained in:
parent
d746e18ef5
commit
e03d96363f
1 changed files with 8 additions and 8 deletions
|
@ -458,7 +458,7 @@ Here is a script which prints the factorial of its argument:
|
||||||
@end example
|
@end example
|
||||||
In action:
|
In action:
|
||||||
@example
|
@example
|
||||||
$ fact 5
|
$ ./fact 5
|
||||||
120
|
120
|
||||||
$
|
$
|
||||||
@end example
|
@end example
|
||||||
|
@ -487,7 +487,7 @@ definitions, without any extraneous computation taking place. Then we
|
||||||
used the meta switch @code{\} and the entry point switch @code{-e} to
|
used the meta switch @code{\} and the entry point switch @code{-e} to
|
||||||
tell Guile to call @code{main} after loading the script.
|
tell Guile to call @code{main} after loading the script.
|
||||||
@example
|
@example
|
||||||
$ fact 50
|
$ ./fact 50
|
||||||
30414093201713378043612608166064768844377641568960512000000000000
|
30414093201713378043612608166064768844377641568960512000000000000
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ -515,17 +515,17 @@ The command-line arguments here tell Guile to first load the file
|
||||||
point. In other words, the @code{choose} script can use definitions
|
point. In other words, the @code{choose} script can use definitions
|
||||||
made in the @code{fact} script. Here are some sample runs:
|
made in the @code{fact} script. Here are some sample runs:
|
||||||
@example
|
@example
|
||||||
$ choose 0 4
|
$ ./choose 0 4
|
||||||
1
|
1
|
||||||
$ choose 1 4
|
$ ./choose 1 4
|
||||||
4
|
4
|
||||||
$ choose 2 4
|
$ ./choose 2 4
|
||||||
6
|
6
|
||||||
$ choose 3 4
|
$ ./choose 3 4
|
||||||
4
|
4
|
||||||
$ choose 4 4
|
$ ./choose 4 4
|
||||||
1
|
1
|
||||||
$ choose 50 100
|
$ ./choose 50 100
|
||||||
100891344545564193334812497256
|
100891344545564193334812497256
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue