OpenSource For You - - DEVELOPERS -

The ba­sic data types are avail­able in Emacs Lisp. Num­bers can be rep­re­sented by in­te­gers or floats. In­te­gers can have their sign rep­re­sen­ta­tion be­fore the digit (+1, -2). Float­ing point num­bers can be rep­re­sented us­ing a dec­i­mal point (3.1415) or with an ex­po­nent (314.15e-2). A char­ac­ter (S) is rep­re­sented by its in­te­ger code (83), while a string is a list of char­ac­ters en­closed within dou­ble quotes (“A string’’).

A sym­bol is an ob­ject with a name. A key­word sym­bol is one that starts with a colon (:). A vec­tor is an ar­ray and can con­tain dif­fer­ent types ([1 “two’’ :three]). The Boolean val­ues for true and false are ‘t’ and ‘nil’ re­spec­tively. A cons cell is an ob­ject with two slots. The first slot is called the CAR (Con­tents of the Ad­dress part of the Reg­is­ter num­ber) and the se­cond slot is called the CDR (Con­tents of the Decre­ment part of the Reg­is­ter num­ber). A list is a se­ries of linked cons cells. For ex­am­ple, in the list ‘(A B)’, the CAR is A and the CDR is B.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.