From 5f5fb466630db9dc8e17895c90ed74105852e827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 21 Oct 2016 15:44:49 +0200 Subject: erl_interface: Remove CDATA tag except for example code --- lib/erl_interface/doc/src/erl_format.xml | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'lib/erl_interface/doc/src/erl_format.xml') diff --git a/lib/erl_interface/doc/src/erl_format.xml b/lib/erl_interface/doc/src/erl_format.xml index f6f27326ff..5b8b7b5e78 100644 --- a/lib/erl_interface/doc/src/erl_format.xml +++ b/lib/erl_interface/doc/src/erl_format.xml @@ -49,8 +49,8 @@

A general function for creating Erlang terms using a format specifier and a corresponding set of arguments, much - in the way works.

-

is a format specification string. + in the way printf() works.

+

FormatStr is a format specification string. The valid format specifiers are as follows:

~i - Integer @@ -59,10 +59,10 @@ ~s - String ~w - Arbitrary Erlang term -

For each format specifier included in , +

For each format specifier included in FormatStr, there must be a corresponding argument following - . An Erlang term is built according to - with values and Erlang terms substituted + FormatStr. An Erlang term is built according to + FormatStr with values and Erlang terms substituted from the corresponding arguments, and according to the individual format specifiers. For example:

-

This creates an structure corresponding +

This creates an (ETERM *) structure corresponding to the Erlang term -

+ [{name,madonna},{age,21},{data,[{adr,"E-street",42}]}]

The function returns an Erlang term, or NULL if - does not describe a valid Erlang + FormatStr does not describe a valid Erlang term.

@@ -92,18 +92,18 @@ erl_format("[{name,~a},{age,~i},{data,~w}]", section Pattern Matching in the Erlang Reference Manual.

- is an Erlang term, possibly + Pattern is an Erlang term, possibly containing unbound variables. - is an Erlang term that we wish to match - against . + Term is an Erlang term that we wish to match + against Pattern. -

and are compared - and any unbound variables in are bound to - corresponding values in .

-

If and can be +

Term and Pattern are compared + and any unbound variables in Pattern are bound to + corresponding values in Term.

+

If Term and Pattern can be matched, the function returns a non-zero value and binds any unbound - variables in . If - and do + variables in Pattern. If Term + and Pattern do not match, 0 is returned. For example:

-

can be used to retrieve the +

erl_var_content() can be used to retrieve the content of any variables bound as a result of a call to - .

+ erl_match().

-- cgit v1.2.3