From 07c086c1b9ea74996f20339d42ca91c3411966f5 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 1 Feb 2013 12:24:22 +0100 Subject: [stdlib] Add new SDTLIB application variable 'shell_strings' Use the new function shell:strings/1 to toggle how the Erlang shell outputs lists of integers. --- lib/stdlib/doc/src/shell.xml | 22 ++++++++++++++++++---- lib/stdlib/doc/src/stdlib_app.xml | 9 +++++++-- 2 files changed, 25 insertions(+), 6 deletions(-) (limited to 'lib/stdlib/doc') diff --git a/lib/stdlib/doc/src/shell.xml b/lib/stdlib/doc/src/shell.xml index bc2120c37d..7f251c863e 100644 --- a/lib/stdlib/doc/src/shell.xml +++ b/lib/stdlib/doc/src/shell.xml @@ -4,7 +4,7 @@
- 19962011 + 19962013 Ericsson AB. All Rights Reserved. @@ -781,7 +781,7 @@ loop(N) -> - catch_exception(Bool) -> Bool + catch_exception(Bool) -> boolean() Sets the exception handling of the shell Bool = boolean() @@ -801,8 +801,8 @@ loop(N) -> Sets the shell prompt -

Sets the shell prompt function to PromptFunc. The - previous prompt function is returned.

+

Sets the shell prompt function to PromptFunc. + The previous prompt function is returned.

@@ -827,6 +827,20 @@ loop(N) -> is meant to be called from the shell.

+ + + Sets the shell's string recognition flag. + +

Sets pretty printing of lists to Strings. + The previous value of the flag is returned.

+

The flag can also be set by the STDLIB application variable + shell_strings. The default is + true which means that lists of integers will be + printed using the string syntax, when possible. The value + false means that no lists will be printed using the + string syntax.

+
+
diff --git a/lib/stdlib/doc/src/stdlib_app.xml b/lib/stdlib/doc/src/stdlib_app.xml index a615c1bf88..2391bb6f03 100644 --- a/lib/stdlib/doc/src/stdlib_app.xml +++ b/lib/stdlib/doc/src/stdlib_app.xml @@ -4,7 +4,7 @@
- 20052010 + 20052013 Ericsson AB. All Rights Reserved. @@ -51,7 +51,7 @@

This parameter can be used to run the Erlang shell in restricted mode.

- shell_catch_exception = bool() + shell_catch_exception = boolean()

This parameter can be used to set the exception handling of the Erlang shell's evaluator process.

@@ -76,6 +76,11 @@

This parameter can be used to determine how many results are saved by the Erlang shell.

+ shell_strings = boolean() + +

This parameter can be used to determine how the Erlang + shell outputs lists of integers.

+
-- cgit v1.2.3