Clojure language 2: literal

Source: Internet
Author: User

Literal may be a literal constant.

String

To represent a string, double quotation marks should be used, such as "Hello, world", to allow cross-line, and Java escape characters can be used. For more information, see:

Http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.6

Nil

Nil is equivalent to null in Java, indicating no value. If it is used in a conditional expression, false is returned.

Boolean Value

True or false

Clojure syntax keywords

Number

Supports Java numeric types

The floating-point number follows the suffix m to indicate the bigdecimal type.

An infinite integer is also supported.

Supported scores, for example, 22/7

It can also represent different hexadecimal formats, such as binary writing: 2r101010

The ambiguity in the following sentence is actually \ x => X, \ is actually a macro.

Characters-Preceded by a backslash: \ c. \ newline, \ Space and \ tab yield the corresponding characters.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.