>} ...">

Erlang Single Quotation Mark Syntax

Can someone explain single quotes ('') in Erlang's write syntax?

#'queue.declare'{queue = <<"hello">>}
+4
source share
2 answers

In this expression, the 'queue.declare' name of the entry , and therefore there must be an atom .

An atom must be enclosed in single quotation marks (') if it does not start with a lowercase letter or if it contains characters other than alphanumeric characters, underscore (_) or @.

+15
source

'for atoms and "for strings. 'and "are not interchangeable, so use them in appropriate places.

, : http://www.erlang.org/doc/reference_manual/data_types.html

0

Source: https://habr.com/ru/post/1528247/


All Articles