UkrReferat.com

: 75834
: 2016-11-29
7 10



$

'

 

:   

, , :

()
dimich
, , ,
Word Doc
1346
291

:

 

 

 

.

, P - .

 

 

1. UNPACK . , P -

. ,

NIL.

 

$ (UNPACK abcde) $ (UNPACK 216) $ (SETQ *PRINT-BASE 16*)

 

(a b c d e) (\2 \1 \6) $ (UNPACK 216)

 

(\0 \D \8)

 

 

2. PACK . , P - 䳺

P - . P -

- . PACK

, P -

.

 

$ (PACK (a b c d e) $ (PACK (\7 \3 \1) $ (PACK (Q \7 \A \1))

 

abcde |731| Q7A1

 

 

3. PACK* ... . , P-

P- . PACK,

, - .

 

$ (PACK* a b c) $ (PACK 4 QW T)

 

ABC |4QWT|

 

 

4. CHAR . ,

, CHAR , P - n- P

- , 0.

NIL , P -

n .

 

(DEFUN CHAR (atm n) $ (CHAR ABCDE 3) $ (CHAR 12345 0)

 

((ATOM atm) D \1

 

(NTH n (UNPACK atm)) ) )

 

 

5. SUBSTRING . ,

䒺 , nm, SUBSTRING , P -

P - n- m-,

0. n0, n=0.

m , 0 P -

, m P - .

n>m NIL.

 

 

(DEFUN SUBSTRING (atm n m)

 

((AND (ATOM atm) (INTEGERP n))

 

((MINUSP n) (SUBSTRING atm 0 m))

 

(PACK (SUBLIST (UNPACK atm) n m))

 

$ (SUBSTRING ABCDEFG 2 4) $ (SUBSTRING ABCDEFG 3)

 

CDE DEFG

 

$ (SUBSTRING 123456 3) $ (SUBSTRING ABCDEFG 0 3)

 

|456| ABCD

 

 

, <=, >=, =, /=. ³

P - .

NIL, .

, T. STRING=

T NIL. NIL,

, P - .

 

$ (STRING= ABC ABC) $ (STRING ABC ABC NIL)

 

T T

 

$ (STRING= Abc AbC) $ (STRING= Abc AbC NIL)

 

T NIL

 

$ (STRING= |100| 100) $ (STRING< ABC AZC)

 

T 1

 

$ (STRING< AZC ABC) $ (STRING>= 123 123)

 

NIL 3

 

 

7. STRING-UPCASE . , P - P -

-----> Page:

0 [1] [2] [3]

ò