.

АвтоЛИСП – реализация языка программирования

Язык: русский
Формат: реферат
Тип документа: Word Doc
0 2613
Скачать документ

Aeaaa 1

Aaaaeaiea

AaoiEENI – ?aaeecaoeey ycuea i?ia?aiie?iaaiey EENI, aeiaeaiiiai a
i?aaeaeao nenoaiu AaoiEAAe. AaoiEENI iicaieyao iieueciaaoaeyi e
?ac?aaio/eeai AaoiEAAeA ienaoue iae?ii?ia?aiiu e ooieoeee ia i/aiue
aunieii, iaoiaeyuai a?aoe/aneia i?eiaiaiea, o?iaia ycuea. EENI i/aiue
aeaie, eaaie a eco/aiee e i?eiaiaiee.

Caia/aiea

Aeey aieaa yooaeoeaiiai i?eiaiaiey AaoiEAAeA iao iaiaoiaeeiinoe
eco/aoue AaoiEENI; anee o aan iao iiuoa eiiiuethoa?iiai
i?ia?aiie?iaaiey, i?i/oeoa oieueii onoaiiai/iua o?aaiaaiey a aeaaa 2 –
yoi iicaieeo aai oaeaeaoue i?eiaiyaiua AaoiEENIii i?aeiouanoaa
iiiai/eneaiiuo iaith AaoiEAAeA. Iaeiaei, anee aai i?aaeony
i?ia?aiie?iaaoue, i?i/oeoa yoi ?oeiaiaenoai aei eiioea, /oiau ociaoue
eae i?eiaiyoue AaoiEENI aeey i?aia?aciaaiey iniiaiiai iacia/aiey
iaeaoa ecaioiaeaiey /a?oaaeae AaoiEAAeA a aieaa iiuiue eino?oiaio
i?ia?aiienoa.

Aeaiiay eieaa – ni?aai/iee, a ia o/aaiee ii i?ia?aiie?iaaieth. Oioy a
aeaaa 3 iu e i?eaiaeei i?eia? i?aeoe/aneiai i?eiaiaiey AaoiEENIa, iu
ana aea ?aeiiaiaeoai aeinoaoue ?acee/iua oaenou ia EENIa aeey
eco/aiey yoiai ycuea i?ia?aiie?iaaiey: Aeinoii e Oi?i “LISP” (aoi?ia
ecaeaiea), “Looking at LISP” Oiie Oanaia?a (iaa eieae iioaeeeiaaiu
Yaeaeeniiii Aaneae). EENI – ycue, niaea?aeauee iiiai aeeaeaeoia:
IaeEENI, Eioa?EENI, CaoaEENI e EiiiiiEENI. AaoiEENI ii neioaeneno e
oneiaiui iaicia/aieyi iaeaieaa aeecie e EiiiiiEENIo, ii ii n iaiueoei
iiaeiiiaeanoaii e eiaao aieueoa niaoeeoe/aneeo aeey AaoiEAAea
aeiiieieoaeueiuo ooieoeee. Yoio ni?aai/iee niaea?aeeo ana ooieoeee
aaoiEENIa e niiniau eo i?eiaiaiey.

1.1 Oeiu aeaiiuo a AaoiEENIa

AaoiEENI niaea?aeeo ianeieueei ?acee/iuo oeiia aeaiiuo:

– lists – nienee

– symbols – neiaieu

– strings – no?i/ee

– real numbers – aeaenoaeoaeueiua /enea

– integers – oeaeua /enea

– file descriptors -aeane?eioi?u oaeea

– AutoCAD entity “names” – “eiaia” iauaeoia AaoiEAAea

– AutoCAD selection-sets – naeoeee onoaiiaie AaoiEAAea

– subrs (build-in functions) – (ano?iaiiua ooieoeee)

Oeaeua /enea – 16-aeoiua /enea ni ciaeii n aeeaiaciiii io -32768 aei
+32767. Aeaenoaeoaeueiua /enea i?aaenoaaeaiu eae ieaaathuay oi/ea n
aeaieiie oi/iinoueth. No?i/ee iiaoo auoue ethaie aeeeiu, eo iaiyoue
aeeiaie/anee ?ani?aaeaeyaony.

AaoiEENI niaea?aeeo ianeieueei ano?iaiiuo ooieoeee ii iaania/aieth
aacena aeey i?ia?aiie?iaaiey /a?oaaeae a aeaoo e o?ao ecia?aieyo. I?e
?aaioa n a?aoe/aneeie eii?aeeiaoaie, ?anniao?eaathony neaaeothuea
oneiaiua iaicia/aiey:

2D points – au?aaeaiu eae ia?a/ie aeaoo aeaenoaeoaeueiuo /enae

(X Y):

(3.400000 7.520000 )

Ia?aia cia/aiea – eii?aeeiaoa X, aoi?ia – Y.

3D points – au?aaeaiu eae ia?a/ie o?ao aeaenoaeoaeueiuo /enae

(X Y Z ):

(3.400000 7.520000 1.000000)

Ia?aia cia/aiea – eii?aeeiaoa X,aoi?ia -Y, o?aouea -Z.

Anyeee ?ac i?e o?aaiaaiee AaoiEAAea aaanoe ii?aaeaeaiiue oei
(iai?eia?, oi/eo eee ianooaaiue eiyooeoeeaio) iiaeao i?eiaiyoueny
au?aaeaiea yoiai oeia eee ooieoeey AaoiEENIa, aaiaeyuay a ?acoeueoaoa
yoio oei.

1.2 Au/eneeoaeue ycuea AaoiEENI

Au/eneeoaeue yaeyaony iniiaie eioa?i?aoaoi?a eaaeaeiai aa?eaioa EENIa.
Ii aa?ao no?i/eo aoiaeiuo aeaiiuo iieueciaaoaey, au/eneyao aa e auaeaao
?acoeueoao. A i?ioeanna au/eneaiey AaoiEENIa o/anoaotho:

– oeaeua, aeaenoaeoaeueiua /enea; no?i/ee; aeane?eioi?u oaeea;
ano?iaiiua ooieoeee – au/eneythony ii ioiioaieth naie e naaa;

– neiaieu – au/eneythony e cia/aieth eo oaeouae eiiiiiiaee;

– nienee – au/eneythony niaeanii eo ia?aiai yeaiaioa, anee iie
au/eneythony a:

nienie (eee ionoie nienie); nienie i?aaeiieaaaao auoue ii?aaeaeaieai
ooieoeee, a ooieoeey au/eneyaony n i?eiaiaieai cia/aiee inoaeueiuo
yeaiaioia nienea a ea/anoaa ia?aiao?ia.

iacaaiea aioo?aiiae ooieoeee (subrs); inoaaoeany yeaiaiou nienea
i?ioiaeyo a subr eae oi?iaeueiua ia?aiao?u e au/eneythony n iiiiuueth
subr.

Anee a ioaao ia iiaeneaceo AaoiEAAea “Command:” au aaiaeeoa au?aaeaiea
ia ycuea AaoiEENI, AaoiEENI au/eneeo au?aaeaiea e iaieoao ?acoeueoao.
Iiaeneacea AaoiEAAea “Command:” aiiaue iiyaeony ia ye?aia.

Anee iaia/aoaii eee i?i/eoaii ec oaeea iai?aaeeueiia au?aaeaiea,
AaoiEENI auaeano neaaeothuoth iiaeneaceo:

n>

aaea n – oeaeia /enei, iaicia/athuaa neieueei o?iaiae eaauo neiaie
inoaeinue iacae?uouie. Anee iiyaeeanue yoa iiaeneacea, au aeieaeiu
iaia/aoaoue n i?aauo neiaie aeey oiai, /oiau aueoe ec yoiai
ninoiyiey. Iauay ioeaea – eaii?e?iaaiea caeeth/aiiiai a e?oaeuo neiaeao
cia/ea (“) a no?iea oaenoa; a yoii neo/aa i?aaua neiaee aoaeoo
eioa?i?eoe?iaaiu eae oaea i?ioeeoe?iaaiiua e ia aoaeoo o/eouaaoueny i?e
eciaiaiee n. Aeey oiai, /oiau eni?aaeoue yoi iieiaeaiea, iaia/aoaeoa
ia?aae n i?aauie neiaeaie eaau/ee.

1.3 Eaene/aneea oneiaiua iaicia/aiey

I?ioeaaeo?a aaiaea AaoiEENIa eiaao ianeieueei oi?i. Aa iiaeii
i?iaeaeaoue neaaeothuei ia?acii: iaoiaeynue a AaoiEAAea iaia/aoaoue
aucia n eeaaeaoo?u; i?i/eoaoue ec ASCII oaeea eee ec no?i/a/iie
ia?aiaiiie. A ethaii neo/aa iaiaoiaeeii neaaeothuaa:

– eiaia neiaieia iiaoo ninoiyoue ec ethaiai ni/aoaiey ia/aoiuo
oa?aeoa?enoee,e?iia neaaeothueo: ( ) . ‘ ” ;

– eiy neiaiea eee /eneiaie eiinoaiou aoaeoo caaa?oaoueny neaaeothueie
ciaeaie:

( ) ‘ ” ; (i?iiaaeooie) (eiiaoe eeiee)

– au?aaeaiey iiaoo ninoiyoue ec iiiai/eneaiiuo eeiee;

– iiiai/eneaiiua i?iiaaeooee iaaeaeo neiaieaie yeaeaaeaioiu aaeeie/iiio
i?iiaaeooeo. Iiea ia o?aaoaony niauaiea, au iiaeaoa i?eiaiyoue eo aeey
i?eaeaiey yniinoe no?oeoo?a aaoeo ooieoeee;

– neiaieu e eiaia ooieoeee (subrs) ia /oanoaeoaeueiu e ?aaeno?ai a
AaoiEENIa. Eiaia neiaieia iiaoo e ia ia/eiaoueny n oeeo?u;

– eiinoaiou oeaeuo /enae iiaoo ia/eiaoueny n iaiaycaoaeueiuo ciaeia “+”
eee “-“. Eae oiiieiaeinue ?aiaa, iie iaoiaeyony a aeeaiaciia io
-32768 aei +32767;

– eiinoaiou aeaenoaeoaeueiuo /enae niaea?aeao iaeei eee aieaa oeeo?iauo
?ac?yaeia, nii?iaiaeaeaaiua oi/eie aeanyoe/iie ae?iae, iinea eioi?ie
neaaeotho iaeei eee ianeieueei oeeo?iauo ciaeia, iai?eia? “.4” ia
?anniao?eaaaony eae aeaenoaeoaeueiia /enei, i?aaeeueii aoaeao “0.4”.
Aiaeiae/ii,”5.” iaaeaenoaeoaeueii, i?aaeeueii – “5.0”.
Aeaenoaeoaeueiua /enea iiaoo i?eiaiyoueny a iao/iuo caienyo o.a. iiaoo
ano?aoeoueny iaiaycaoaeueiia “a” eee “A”, nii?iaiaeaeaaiia oeeo?iaui
iieacaoaeai;

– aoeaaiiua no?i/ee – iineaaeiaaoaeueiinoue neiaieia, caeeth/aiiay a
eaau/ee. Aioo?e no?iee, acyoie a eaau/ee, neiaie (\) icia/aao
aiciiaeiinoue aeeth/aiey eiio?ieueiuo neiaieia. ?anniio?ei neaaeothuea
oaeouea eiaeu:

\\ icia/aao neiaie “\”

\e icia/aao auoiae

\n icia/aao iiaay no?iea

\r icia/aao aaiae

\t icia/aao oaaoeyoeeth

\nnn icia/aao neiaie, /ae ainueie?e/iue eiae – nnn

Iai?eia?, ia iiaie eeiee iiyaeony neaaeothuay iiaeneacea:

(prompt “\nEnter first point: “)

– aaeeie/iue oeeoe?oaiue neiaie iiaeao i?eiaiyoueny eae nie?auaiea
ooieoeee QUOTE. Oae, ‘foo yeaeaaeaioii (quote foo)

– eiiiaioa?ee, acyoua ec aeeneiauo oaeeia, iiaoo auoue aeeth/aiu a
i?ia?aiiu AaoiEENIa. Eiiiaioa?ee ia/eiathony n aeaiaoi/ey e
i?iaeieaeathony aei eiioea no?iee. Iai?eia?,

:This entire line is a comment

:Yoa iieiay no?iea – eiiiaioa?ee

(setq area (* pi r r )) :Compute area of circle

:?ann/eoaeoa ieiuaaeue e?oaa

1.4 Oneiaiua iaicia/aiey i?eia/aiee

Yoi ni?aai/iia iiniaea i?eiaiyao ii?aaeaeaiiua oneiaiua iaicia/aiey
aeey aeieoiaioe?iaaiey ?aaeeia ooieoeee. Iai?eia?,

(moo …)

no?iea oeeo?a

Eiy ooieoeee iieacaii oaeei, eaeei au aeieaeiu aai aaanoe. Caeeth/aiiua
a eaau/ee yeaiaiou aeaiiuo, neaaeothuea ca eiaiai ooieoeee, ii?aaeaeytho
eiee/anoai e oei ia?aiao?ia, i?aaeiieaaaaiuo ooieoeeae.

A yoii i?iia?a ooieoeey “moo” eiaao aeaa iaiaoiaeeiuo ia?aiao?a:
no?iea e oeeo?a. Yeeeinen (“…”) ii?aaeaeyao, /oi e ooieoeee iiaoo
auoue i?eniaaeeiaiu aeiiieieoaeueiua oeeo?iaua ia?aiao?u. Ia
aeeth/aeoa a no?ieo neiaee eee yeeeinenu, anee au niaaaeaaoa ooieoeeth
nnueeaie.

Aucia aeaiiiai oi?iaoa ooieoeee “moo” iieacai auoa; aeey ooieoeee
“moo” aoaeoo aeaenoaeoaeueiuie neaaeothuea nnueee:

(moo “Hello” 5)

(moo “Hi” 1 2 3 )

Neaaeothuea i?eia?u ia niioaaonoaotho o?aaoaiiio oi?iaoo e i?eaaaeoo e
ioeaeai:

(moo 1 2 3 ) (ia?aue ia?aiao? aeieaeai auoue no?ieie)

(moo “Hello”) (aeieaeai auoue oioy au iaeei oeeo?iaie ia?aiao?)

(moo “do” ‘(1 2)) (aoi?ie ia?aiao? aeieaeai auoue no?ieie,a ia ia?a/iai)

Eiaaea iaiaycaoaeueiue ia?aiao? iiaeao aicieeiooue iaeei ?ac, aac
iiaoi?aiee, ii caeeth/aaony a eaaae?aoiua neiaee (“[]”):

(foo [])

Caeanue ooieoeey “foo” i?aaeiieaaaao iaeei no?i/a/iue ia?aiao? e
i?eieiaao iaeei iaiaycaoaeueiue oeeo?iaie ia?aiao?. Iai?eia?, aeey
ooieoeee “foo” aoaeoo aeaenoaeoaeueiu neaaeothuea auciau:

(foo “catch”)

(foo “catch” 22)

A yoii i?eia?a iieacaiu iai?aaeeueiua auciau:

(foo 44 13) (ia?aue ia?aiao? aeieaeai auoue no?i/a/iui)

(foo “foe” 44 13) (neeoeii iiiai ia?aiao?ia)

1.5 Eciaiaiey e ?anoe?aiey

Ia?aaioea ioeaee

Anee AaoiEENI noaeeeaaaony n ioeaeie ai a?aiy au/eneaiey, ii auaeaao
niiauaiea neaaeothuae oi?iu:

error:text

aaea text – iienaiea ioeaee. Anee onoaiiaeaia ooieoeey “ERROR” (ia
iieue), AaoiEENI,aianoi auaea/e niiauaiey, auiieiyao yoo ooieoeeth
(“text”- aa aaeeinoaaiiue ia?aiao?). Anee”ERROR” ia onoaiiaeaia, eee
a?aie/eo n ioeai, au/eneaiea AaoiEENIa inoaiaaeeaaaony, a ia ye?aia
iiyaeony ia?aoiue oiae auciaa ooieoeee e aa aucuaathuae i?ia?aiiu aei
100 o?iaiae aaeoaue.

Aeaaa 2

Onoaiiaea AaoiEENIa

2.1 O?aaiaaiey

Auione oi?iaoa

AaoiEENI niaaaeaaony ethaie eiieae Aaoieaaea. Ieeaeeo niaoeeaeueiuo
onoaiiaie ia o?aaoaony. Oaee “acadl.ovl” ia ?aai/ae aeeneaoa
yaeyaony iaa?eaai AaoiEENIa a AaoiEAAea.

Iaeia ec ?aai/eo aeeneao AaoiEAAea niaea?aeeo oaee
“readme.doc”. I?iniio?eoa yoio oaee; ii niaea?aeeo naiua iineaaeiea
eciaiaiey e ei??aeoe?iaee a aeieoiaioaoeee AaoiEAAea e AaoiEENIa.

2.2 Aaoiiaoe/aneea ooieoeee – oaee “acad.lsp”

Ia/eiay naain ?aaiou a?aoe/aneiai ?aaeaeoi?a AaoiEAAea, AaoiEENI
caa?oaeaao oaee “acad.lsp” (anee oaeie nouanoaoao). Ia yoii oaeea au
iiaeaoa caaeaoue ii?aaeaeaiey iaeaieaa /anoi eniieuecoaiuo ooieoeee e
iie aoaeoo aaoiiaoe/anee aun/eouaaoueny i?e ?aaeaeoe?iaaiee /a?oaaea.
Ni.ii?aaeaeaiea ooieoeee DEFUN a aeaaa 4 .

Aeaaa 3

Ii naaeiaie aei?iaeea e AaoiEENIo

Aieueoia eiee/anoai iiuiinoe AaoiEAAea iinooiaao ca n/ao aai
niiniaiinoe caeacuaaoue aa. Iiaeeaea iiciaeiieaoenue n AaoiEAAeii,
iiaeii caiaoeoue, /oi aai au oioaeinue, /oiau o iaai auea iaeioi?ay
aiciiaeiinoue, /anoi iaiaoiaeeiay aai. Au iiaeaoa ia/aoue aeiaaaeaiea
iineaaeiaaoaeueiinoe eiiaiae, eioi?ua au /anoi i?eiaiyaoa ia ye?aia,
eiiiie eee ieaioaoiiai iaith. Au iiaeaoa ii?aaeaeeoue iiaua oeiu
eeiee, ia?acoeu oo?eoiaee eee oaenoiaue o?eoo. Yoei au eniieuecoaoa
i?aeiouanoaa ioe?uoie a?oeoaeoo?u AaoiEAAea – aiciiaeiinoue ?anoe?eoue
aai e noi?ie?iaaoue aai a aao ia?niiaeueii-ni?iaeoe?iaaiiue
eino?oiaioa?ee, ?aaae?othuee ia iniaaiiinoe aaoaai iuoeaiey e ?aaiou.

sscue AaoiEENI – iaeaieaa iiuiia oneiaea aeey ?anoe?aiey aiciiaeiinoae
AaoiEAAea. Yoe, iaania/aiiuaAaoiEAAeii aeaaii?eyoiua oneiaey –
?aaeecaoeey ycuea i?ia?aiie?iaaiey EENI, a ni/aoaiee n AaoiEAAeii.
Ninoaaeyy i?ia?aiio ia AaoiEENIa, au iiaeaoa aeiaaaeoue eiiaiaeu aeey
AaoiEAAea e eiaoue aieueoa iiuiinoe aeey iiaeeoeoee?iaaiey AaoiEAAea
(/oi e eiatho iaoe ?ac?aaio/eee i?ia?aiiiiai iaania/aiey).

Anei?a iu aeiaaaei iiaoth eiiaiaeo aeey AaoiEAAea. A i?ioeanna
iauyniaiey i?eioeeia ?aaiou AaoiEENIa, iu aeaaeei aai aiciiaeiinoue
eniieueciaaiey aai iiuiinoe aeey ?aaiou ia aan. Eiiaiaea, eioi?oth iu
niae?aainy nicaeaoue, ni?eaioe?iaaia ia a?oeoaeoo?o iiaa?oiinoe, ii
i?eioeeiu , eioi?ua au eco/eoa, – ?aeaaaioiua, ia n/eoathueany n
aaoae iaeanoueth i?eiaiaiey.

3.1 *oi au aeieaeiu ciaoue ia?aae ia/aeii ?aaiou

Iu i?aaeiieaaaai,/oi au niinii aeaaeaaoa AaoiEAAeii – o.a. au ciaaoa
eiiaiaeu AaoiEAAea e iauea i?eioeeiu eo i?eiaiaiey. Iu oaeaea
i?aaeiieaaaai, /oi au ciaeiiu n oaenoiaui ?aaeaeoi?ii, eioi?ue iiaeao
nicaeaaaoue ASCII oaeeu. Nae/an iu iaieoai i?ia?aiio, a au i?eiaiyeoa
naie oaenoiaue ?aaeaeoi? aeey auiieiaiey iaoeo caaeaiee.

A yoii i?eia?a iu aoaeai i?eiaiyoue iiiai ooieoeee AaoiEENIa.
Iineaaeothuea aeaau yoiai ?oeiaiaenoaa niaea?aeao iieiia iauyniaiea
anao yoeo ooieoeee.

3.2 Caaea/a

Iaoa caaea/a – nicaeaoue iiaoth i?ia?aiio aeey AaoiEAAea, eioi?ay
?enoao naaeiaoth aei?iaeeo e caiieiyao aa e?oaeuie ieeoaie.

Iaoa iiaay eiiaiaea aoaeao eiaoue neaaeothuoth iineaaeiaaoaeueiinoue
eiiaiae:

COMMAND: PATH (AeI?IAEEA)

Start point of path: start point

(Ia/aeueiay oi/ea aei?iaeee: ia/aeueiay oi/ea)

End point of path: end point

(Eiia/iay oi/ea aei?iaeee: eiia/iay oi/ea)

Half point of path: number

(Iieiaeia oe?eiu aei?iaeee: /enei)

Radius of tiles: number

(?aaeeon ieeo: /enei)

Spacing between tiles: number

(?annoiyiea iaaeaeo ieeoaie: /enei)

aaea ia/aeueiay e eiia/iay oi/ee ii?aaeaeytho oeaio?aeueioth eeieth
aei?iaeee. Ii?aaeaeyaony iieiaeia oe?eiu aei?iaeee e aaiaeeony ?aaeeon
e?oaeuo ieeo. Iaeiiaoe, ii?aaeaeyaony ?annoiyiea iaaeaeo ieeoaie.
Iieiaeio oe?eiu aei?iaeee iu ii?aaeaeyai ?aiueoa, /ai iieioth aa oe?eio
iioiio, /oi yoi iicaieyao aieaa /aoei ii?aaeaeeoue io?acie oeia
“?aceiiaay ieoue” io ia/aeueiie oi/ee.

3.3 Ia/aei

Iu aei eiioea ?aciaueai yoo i?eeeaaeioth caaea/o (ii ainoiaeyuae). A
yoie caaea/a iu aoaeai i?eiaiyoue aeanoeia caaeaiea oaeia.

AaoiEENI, eae e iiiaea ae?oaea ycuee i?ia?aiie?iaaiey, ii?aaeaeyao oaeu
a ?aaeeaiao. ?aaeeaiu ecia?ytho oaeu io 0 aei 2’PL. Oae eae
aieueoeinoai ecia?yao oaeu a a?aaeonao, iu ii?aaeaeei ooieoeeth,
eioi?ay i?aia?aciauaaao a?aaeonu a ?aaeeaiu. Eniieuecoy aao ?aaeaeoi?
oaenoa, nicaeaeoa oaee GP.LSP. Aaaaeeoa neaaeothuoth i?ia?aiio:

: Convert angle in degree to radians

(defun dtr (a)

(*pi (/a 180.0))

)

Aeaaaeoa ?anniio?ei, /oi yoi aeano. Iu ii?aaeaeeee ooieoeeth, i?eiaiea
a AaoiEENIa ooieoeeth DEFUN. Ooieoeey iacuaaaony DOR (nie?auaiea io
“degrees to radians” (“a?aaeonu a ?aaeeaiu”)).

Iia niaea?aeeo iaeei ia?aiao? “a” – oaie a a?aaeonao. A ?acoeueoaoa –
au?aaeaiea:

PI * (a / 180.0)

eioi?ia a i?eia/aieyo EENIa ?anoeo?iauaaaony eae: “i?iecaaaeaiea io
PI, oiiiaeaiiia ia eiyooeoeeaio A, ?acaeaeaiiia ia 180 a?aaeonia”. PI
i?aaeii?aaeaeyaony EENIii eae 3.1459…; no?i/ea, ia/eiathuayny n
aeaiaoi/ey,- eiiiaioa?ee – AaoiEENI eaii?e?oao oaeno, ?aniieiaeaiiue
iinea aeaiaoi/ey.

Nio?aieoa oaee ia aeenea, caoai ia?aeaeeoa ia iiaue /a?oaae (eiy ia
eiaao cia/aiey, o.e. iu ia aoaeai nio?aiyoue /a?oaae).

Eiaaea iiyaeony iiaeneacea AaoiEAAea “Command:”, caa?oceoa ooieoeeth,
aaaaey:

Command: (load “gp”)

AaoiEENI caa?oceo aaoo ooieoeeth, io?aaeay aa eiy a “DOR”. Aeaeaa a
yoii ?oeiaiaenoaa, eiaaea iu aiai?ei : “Aaaaeeoa AaoiEAAe e caa?oceoa
i?ia?aiio”, aoaeao iiae?acoiaaaoueny i?iaeaeaiiay oieueei /oi
iineaaeiaaoaeueiinoue.

Nae/an iu i?iaa?ei ooieoeeth, auiieiyy ?acee/iua aeaenoaey. Ec
ii?aaeaeaiey ?aaeeaiu, 0 a?aaeonia aeieaeii niioaaonoaiaaoue ioeaaie
?aaeeaia; aaaaeeoa a AaoiEAAe no?i/eo:

Command: (dtr 0)

Ia/aoay no?ieo, ia/eiathuothny n eaaie e?oaeie neiaee, au canoaaeyaoa
AaoiEAAe ia?aaiaeeoue yoo no?ieo a AaoiEENI aeey au/eneaiey. A yoii
neo/aa iu aun/eouaaai ooieoeeth DIR, oieueei /oi ii?aaeaeaiioth iaie,
ia?aaeaaay ae ia?aiao? – iieue. Iinea aun/eouaaiey ooieoeee, AaoiEAAe
auaeano ?acoeueoao; oae iao aaiae auaeano neaaeothuee ioaao:

0.000000

Oaia?ue aeaaaeoa iii?iaoai 180 a?aaeonia. Anee au aaaaeaoa

Command: (dtr 180)

au iieo/eoa ioaao:

3.141593

Yoi iieacuaaao, /oi 180 a?aaeonia ?aaii PI ?aaeeaiai. Anee au
enneaaeoaoa ooieoeeth, au oaaaeeoanue, /oi yoi eiaiii oae.

Aeey auoiaea ec AaoiEAAea aaaaeeoa:

Command: QUIT

e ia iiaeneaceo

Really want to discard all changes to drawing? Y

(Aeaenoaeoaeueii oioeoa ia o/eouaaoue ana eciaiaiey a /a?oaaea? Ae)

ioaaoueoa

0

a iniiaiii iaith aeey aica?aoa e DOS iiaeneacea. Aeaeaa a ?oeiaiaenoaa
iiae “Aueoe ec AaoiEAAea” aoaeao iiae?acoiaaaoueny yoa i?ioeaaeo?a.

3.4 Aaiae

Iaoa eiiaiaea garden path (naaeiaay aei?iaeea) cai?ineo o
iieueciaaoaey neaaeothuoth eioi?iaoeeth: aaea ?eniaaoue aei?iaeeo, eaeie
oe?eiu aa aeaeaoue, ?acia? eiie?aoiuo ieeo e eae aeecei ae?oa e ae?oao
eo ?aciauaoue. Iu ii?aaeaeei ooieoeeth, eioi?ay aoaeao ni?aoeaaoue
iieueciaaoaey ii anai yoei ioieoai, a caoai i?in/eoaao oeeo?u, eioi?ua
iu i?inoaaei a eiioea eiiaiaeu.

Eniieuecoy ?aaeaeoi? oaenoa, aeiaaaueoa neaaeothuea no?i/ee a GP.LSP
(iu aoaeai i?eiaiyoue aa?oeeaeueioth /a?oo aeey auaeaeaiey
aeiaaaeyaiuo no?i/ae).

: Convert angle in degrees to radians

(defun dtr (a)

(‘pi (/ a 180.0))

)

| :Acquire information for garden path

| (defun gpuser ()

| (setq sp (getpoint “\nStart point of path:”))

| (setq ep (getpoint “\nEnd point of path:”))

| (setq hwidth (getdist “\nHalf width of path:”sp))

| (setq trad (getdist “\nRadius of tiles:”sp))

| (setq pangle (angle sp ep ))

| (setq plength (distance sp ep ))

| (setq width (‘ 2 hwidth))

| (setq angp90 (+pangle (dtr 90))) : Path angle +90 deg

| (setq angm90 (-pangle (dtr 90))) : Path angle -90 deg

Iaiaycaoaeueii niauaoue au?aaeaiey, niaea?aeauea aaoe ooieoeee.
Oaeoe/anee au iiaeaoa aaanoe anth i?ia?aiio a iaeio no?ieo. Iaeiaei,
niauaiea e i?a?uaaiea no?i/ee neoaeeo nicaeaieth aieaa iiiyoiie e /aoeie
aeey /oaiey no?oeoo?u i?ia?aiiu. Oaeaea, ?aniieiaeaiea ia/aeueiuo e
eiia/iuo e?oaeuo neiaie iniiaiuo au?aaeaiee ia iaeiie ine, niinianoaoao
oaa?aiiinoe, /oi aaoe neiaee aa?ii naaeaine?iaaiu.

Eoae, iu ii?aaeaeeee ooieoeeth GPUSER. Iia ia i?eieiaao ia?aiao?ia, a
ni?aoeaaao iieueciaaoaey ii anai ioieoai. Ooieoeey SETQ i?eaiaeeo
ia?aiaiioth AaoiEENIa e ii?aaeaeaiiiio cia/aieth. Ia?aay SETQ
i?eaiaeeo ia?aiaiioth SP (ia/aeueiay oi/ea ) e ?acoeueoaoo ooieoeee
GETPOINT. Iieueciaaoaeue caaeaao oi/ee aeey ooieoeee GETPOINT. Aeey
iieo/aiey oi/ee aoaeao i?eiaiyoueny no?iea, ii?aaeaeythuay iiaeneaceo
AaoiEAAea. “\n” canoaaeyao iiaeneaceo iiyaeoueny ia iiaie eeiee. Iu
i?eiaiyai ooieoeeth GETPOINT aeey iieo/aiey cia/aiey na?aaeeiu oe?eiu
aei?iaeee, ?aaeeona ieeou e ?annoiyiey iaaeaeo ieeoaie. Aoi?ie ia?aiao?
ooieoeee GETPOINT , SP, ii?aaeaeyao “aaciaoth oi/eo” ?annoiyiey.
?annoiyiea iiaeii nicaeaoue, ii?aaeaeea a AaoiEAAea oi/eo,
niioaaonoaothuoth ia/aeueiie oi/ea aei?iaeee, e i?eniaaeeiea e iae
eeieth ?aceiiaie ieoe.

Iinea aaiaea aun/eouaathony iaeaieaa /anoi i?eiaiyaiua ia?aiaiiua.
PANGLE iaicia/aao oaie io ia/aeueiie aei eiia/iie oi/ee aei?iaeee.
Ooieoeey ANGLE aaiaeeo yoio oaie ii caaeaiiui aeaoi oi/eai. PLENGTH
aaiaeeo aeeeio aei?iaeee. Ooieoeey DISTANCE ?ann/eouaaao ?annoiyiea,
caaeaiiia aeaoiy oi/eaie. Caaeaa iieiaeio oe?eiu aei?iaeee, iu
?ann/eouaaai iauoth oe?eio, oiiiaeea ia aeaa caaeaiioth aaee/eio. E,
iaeiiaoe, iu ?ann/eouaaai e nio?aiyai oaie aei?iaeee iethn-ieion 90
a?aaeonia a ia?aiaiiuo ANGP90 e ANGM90 niioaaonoaaiii (o.e. oaeu a
AaoiEENIa ?ann/eouaathony a ?aaeeaiao, iu ia?aae yoeie ?ann/aoaie
i?eiaieee ooieoeeth DTR aeey ia?aaiaea a?aaeonia a ?aaeeaiu).

Nio?aieoa yoo ioei??aeoe?iaaiioth i?ia?aiio ia aeenea, caionoeoa
AaoiEAAe e caa?oceoa i?ia?aiio. Nae/an iu i?iaa?ei ooieoeeth aaiaea,
/oiau oaaaeeoueny, /oi iia ?aaioaao i?aaeeueii.

I?eaaaeeoa a aeaenoaea ooieoeeth, iaia/aoaa:

Command: (gpuser)

Ioaaoueoa ia iiaeneacee neaaeothuei ia?acii:

Ia/aeueiay oi/ea aei?iaeee: 2,2

Eiia/iay oi/ea aei?iaeee: 9,8

Iieiaeia oe?eiu aei?iaeee: 2

?aaeeon ieeou: .2

?annoiyiea iaaeaeo ieeoaie: .1

GPUSER eniieuecoao aaoe ioaaou aeey iiaen/aoa iaiaoiaeeiuo aio
aeiiieieoaeueiuo ia?aiaiiuo e ia ye?aia iiyaeony ?acoeueoao iineaaeieo
iiaen/aoia (a aeaiiii neo/aa – 0,826169, cia/aiea ANGM90 a
?aaeeaiao). Au iiaeaoa ?aca?oceoue ana ia?aiaiiua, onoaiiaeaiiua
ooieoeeae GPUSER iooai iiaenoaiiaee aineeeoeaoaeueiiai ciaea (!)
ia?aae eo eiaiaie. Yoi canoaaeo AaoiEAAe au/eneeoue ia?aiaiiua e
auaeaoue ?acoeueoao ia ye?ai. Anee au aaaaeaoa neaaeothuea eiiaiaeu, au
iieo/eoa neaaeothuea ?acoeueoaou:

Command: !sp

(2.000000 2.000000)

Command: !ep

(9.000000 8.000000)

Command: !hwidth

2.000000

Command: !width

4.000000

Command: !trad

0.200000

Command: !tspac

0.100000

Command: !pangle

0.708626

Command: !plength

9.219544

Command: !angp90

2.279423

Command: !angm90

-0.862169

Ia?aoeoa aieiaiea, /oi PANGLE, ANGP90 e ANGM90 i?aaenoaaeaiu a
?aaeeaiao. Iinea i?iaa?ee yoeo cia/aiee, aueaeeoa ec AaoiEAAea e
aa?ieoanue a naie oaenoiaue ?aaeaeoi? a GP.LSP.

3.5 Aeiaaaeaiea eiiaiae a AaoiEAAe

Iaeiiaoe, iu aioiau iauaaeeieoue ana ninoaaiua /anoe a eiiaiaeo
AaoiEAAea. Anee iu ii?aaeaeei ooieoeeth n eiaiai C:XXX ia ycuea
AaoiEENI, aaiaey OOO (i?aaeiieaaay,/oi OOO ia yaeyaony eiiaiaeie
AaoiEAAea) iu aeoeaece?oai ooieoeeth. Aeey caaa?oaiiinoe aaiaea a
?aaioo iaoae eiiaiaeu PATH, iu ii?aaeaeyai ooieoeeth C:PATH, /oi aeaao
aiciiaeiinoue iai aiineaaenoaee iinea caa?ocee GP.LSP iaia/aoaoue
oieueei PATH e iaoa eiiaiaea garden path aoaeao au/eneyoueny.

Eniieuecoeoa aao oaenoiaue ?aaeaeoi? aeey aeiaaaeaiey oeacaiiie no?i/ee
a GP.LSP, caoai caionoeoa AaoiEAAe e caa?oceoa i?ia?aiio.

N aeiaaaeaieai ooieoeee C:PATH, iu aeiaaaeee eiiaiaeo PATH a AaoiEAAe.
Au iiaeaoa i?iaa?eoue eiiaiaeo, inouanoaea neaaeothuee aaiae:

Eiiaiaea: PATH

Ia/aeueiay oi/ea aei?iaeee: 2,2

Eiia/iay oi/ea aei?iaeee: 9,8

Iieiaeia oe?eiu aei?iaeee: 2

?aaeeon ieeou: .2

?annoiyiea iaaeaeo ieeoaie: .1

3.6 Caii?aaeeaaiea

Oae eae iaoa eiiaiaea PATH auiieiyaony, ana eiiaiaeu, eioi?ua iia
i?aaenoaaeyao a AaoiEAAe, aoaeoo ia?aaeaaaoueny a iaeanoue
eiiaiae/iiaeneacie e ana aua?aiiua ath oi/ee aoaeoo ioia/aoueny ia
ye?aia iaeaiueeeie /a?oi/eaie (iaoeaie). ?ac eiiaiaeiay ooieoeey
iaeaaeaia, aeey iiyaeaiey aaiaeiuo eiiaiae AaoiEENIa oi/ii iioiaeeo ia
eiiaiaeu AaoiEAAea, yoio aaiae iiaeao auoue ioiaiai.

I?eiaiaiea ooieoeee GETVAR iaiaoiaeeii, /oiau iieo/eoue oaeouea
cia/aiey ?aaeeiia AaoiEAAeA BLIPMODE e CMDECHO. Iie nio?aiythony /a?ac
SETQ a SBLIP e SCMDE. Caoai iu i?eiaiyai ooieoeeth SETVAR aeey oiai,
/oiau onoaiiaeoue iaa yoe ia?aiaiiua AaoiEAAea a ioeaaia iieiaeaiea;
yoei aeaeay iaaeaenoaeoaeueiuie iaoee e ia?aaeaiiua eiiaiaeu. Ia?aoeoa
aieiaiea, /oi iu onoaiiaeee yoe ia?aiaiiua a ioeaaia iieiaeaiea iinea
iieo/aiey aaiaea io iieueciaaoaey /a?ac GPUSER. Iu oioei, /oiau iaoee
inoaeenue aeey iiaeoaa?aeaeaiey aaiaea iieueciaaoaey.

Iinea oiai, eae iu caeii/eee /a?/aiea aei?iaeee, iu eniieuecoai
ooieoeeth SETVAR aeey ainnoaiiaeaiey ia?aiia/aeueiiai cia/aiey yoeo
ia?aiaiiuo.

Nio?aieoa oaee, caionoeoa AaoiEAAe e iii?iaoeoa nae/an eiiaiaeo PATH.
Eni?iaoeoa aa ni anao noi?ii, ii?aaeaeyy ?acee/iua aeaeu aaiaea eae i?e
iiiiue iieioa?a, oae e eeaaeaoo?u.

3.7 ?acthia

Ca ei?ioeee ia?eiae a?aiaie au aaaee iiaoth eiiaiaeo a AaoiEAAe. Ai
iiiaeo nenoaiao EAAe aai iiiaaeiaeony neaaeothuaa: aeinooi e enoiaeiiio
eiaeo nenoaiu EAAe, eaaeeoeeaoeey i?ia?aiienoa e aieueoie caian
ciaiee aeey i?iaeaeuaaiey iia?aoeee, iiaeiaii yoie. Ioe?uoay
a?oeoaeoo?a AaoiEAAea e AaoiEENIa i?aaeinoaaeyao aai aiciiaeiinoe,
eioi?ua aieueoeinoai i?iaeaaoeia nenoai EAAe i?eaa?aaatho aeey naay.

Au iiaeaoa i?eiaiyoue yoio i?eia? eae enoiaeioth nooiaiue e
ianoa?noao a AaoiEENIa. Au iiaeaoa ia/aoue n iiaeeoeoee?iaaiey e
?anoe?aiey eiiaiaeu PATH, nicaeaiea eioi?ie au nae/an caaa?oeee.
Iii?iaoeoa ia/a?oeoue eaaae?aoiua e oanoeoaieueiua ieeou. Aeey aieaa
iieiie i?eaioaoeee, nicaeaeoa iiaoth eiiaiaeo, eioi?ay i?eieiaao
oeaio?aeueioth oi/eo e ieiuaaeue, e ?enoao eaaae?ao ii?aaeaeaiiie
ieiuaaee, caiieiaiiue ieeoaie. Au iiaeaoa i?iniio?aoue oieueei /oi
caienaiiua ooieoeee a oaniie nayce n inoaaoeieny aeaaaie yoiai
?oeiaiaenoaa. Caeanue iu aeaee i/aiue e?aoeia iienaiea ?aaiou e
aiciiaeiinoae ooieoeee. AaoiEENI niaea?aeeo iiiai aiciiaeiinoae,
ii?iaiaaa eioi?ua e aeeaea iiciaeiieaoenue n ieie, au niiaeaoa iieiaa
eo eniieueciaaoue.

Iineieueeo au caionoeee AaoiEENI a ?aaioo, au ia?aoee ia iiaue
o?iaaiue niaa?oainoaa a AaoiEAAea. Ii ia?a eniieueciaaiey AaoiEENIa aeey
aaoiiaoecaoeee ecaioiaeaiey /a?oaaeae e eiino?oeoi?neeo caaea/, au
inaiaiaeeoa naay io ?acee/iuo aeaoaeae e niiaeaoa iieiinoueth iinayoeoue
naay i?iaeoe?iaaieth. A “eeoea” AaoiEENIa au i?eia?aee iaooiieiiai
iiiiuieea, eioi?ue aoaeao neoaeeoue aai aeanyoeeaoey.

Aeaaa 4

Ooieoeee AaoiEENIa

AaoiEENI niaaaeai iiiai/eneaiiuie i?aaeii?aaeaeaiiuie ooieoeeyie.
Eaaeaeay ooieoeey aucuaaaony iooai caaeaiey aa eiaie (aa?oiee eee
ieaeiee ?aaeno?) eae ia?aiai yeaiaioa nienea, n ia?aiao?aie (anee
oaeea nouanoaotho) eae iineaaeothueie yeaiaioaie nienea.

A yoie aeaaa au iaeaeaoa aeoaaeoiue nienie iniiaiuo aaciauo ooieoeee
AaoiEENIa. Aeey oaeianoaa iieueciaaiey ooieoeee na?oiie?iaaiu a
i?aaeiaoiii oeacaoaea a eiioea ni?aai/ieea. Au iaia?oaeeoa, /oi iiiaea
ooieoeee noaiaea?oiua, eo iiaeii iaia?oaeeoue a eaaeaeie ?aaeecaoeee
ycuea i?ia?aiie?iaaiey EENI. Ae?oaea aea ooieoeee oieeaeueiu aeey
eioa?aeoeaiuo a?aoe/aneeo i?ia?aiiiuo n?aaenoa, iaania/eaaaiuo
AaoiEAAeii. A iineaaeothueo aeaaao iienuaathony iaeioi?ua ooieoeee n
oeo/oaiiuie naienoaaie.

4.1 (+ …)

Yoa ooieoeey aaiaeeo noiio anao . Iia iiaeao i?eiaiyoueny n
aeaenoaeoaeueiuie e oeaeuie /eneaie. Anee – oeaeua /enea,
?acoeueoao aoaeao au?aaeai oeaeuie /eneaie; anee aea iaeii ec /enae –
aeaenoaeoaeueiia, oeaeua /enea ia?aoiaeyo a aeaenoaeoaeueiua e
?acoeueoao aoaeao au?aaeai aeaenoaeoaeueiui /eneii.

Iai?eia?:

(+1 2) aaiaeeo 3

(+1 2 3 4.5) aaiaeeo 10.500000

(+1 2 3 4.0) aaiaeeo 10.000000

4.2 (- < number > …)

Yoa ooieoeey au/eoaao aoi?ia ec ia?aiai e aaiaeeo ?acieoeo.
Anee caaeaii aieaa aeaoo , ec ia?aiai /enea au/eoaaony noiia io
aoi?iai aei iineaaeiaai yeaiaioa e aaiaeeony eiia/iue ?acoeueoao.
Anee caaeaii oieueei iaeii , aaiaeeony ?acoeueoao au/eoaiey aai
ec ioey. Yoa ooieoeey iiaeao i?eiaiyoueny n aeaenoaeoaeueiaie e oeaeuie
/eneaie, ni noaiaea?oiuie i?aaeeaie ia?aoiaea.

Iai?eia?:

(-50 40) aaiaeeo 10

(-50 40.0 2) aaiaeeo 8.000000

(-50 40.0 2.5) aaiaeeo 7.500000

(-8) aaiaeeo -8

4.3 (* …)

Yoa ooieoeey aaiaeeo i?iecaaaeaiea anao . Iia iiaeao i?eiaiyoueny
n aeaenoaeoaeueiuie e oeaeuie /eneaie ni noaiaea?oiuie i?aaeeaie
ia?aoiaea.

Iai?eia?:

(* 2 3) aaiaeeo 6

(* 2 3 4.0) aaiaeeo 8.000000

(* 3 -4.5) aaiaeeo -13.500000

4.4 (/ …)

Yoa ooieoeey aeaeeo ia?aia ia aoi?ia e aaiaeeo /anoiia. Anee
caaeaii aieaa aeaoo , ia?aia aeaeeony ia i?iecaaaeaiea
aoi?iai e anao iineaaeothueo /enae e aaiaeeony eiia/iia /anoiia.

I?eia?u:

(/100 2) aaiaeeo 50

(/100 2.0) aaiaeeo 50.000000

(/100 20 2.0) aaiaeeo 2.500000

(/100.0 20 2) aaiaeeo 2.500000

(/100 20 2) aaiaeeo 2

(/135 360) aaiaeeo 0

(/135 360.0) aaiaeeo 0.375000

4.5 (= …)

Yoi ioiineoaeueiay ooieoeey “?aaii /aio-eeai”. Iia aaiaeeo T, anee
ana ii?aaeaeaiiua ?aaiu a /eneiaii ioiioaiee, ai anao ae?oaeo
neo/ayo aaiaeeony iieue. Yoa ooieoeey oaeaea aeaenoaeoaeueia aeey
no?i/ae.

I?eia?u:

(=4 4.0) aaiaeeo T

(=20 388) aaiaeeo nil

(=2.4 2.4 2.4) aaiaeeo T

(=499 499 500) aaiaeeo nil

(=”me” “me”) aaiaeeo T

(=”me” “you”) aaiaeeo nil

4.6 (/= )

Yoi ioiineoaeueiay ooieoeey “ia ?aaii /aio-eeai”. Iia aaiaeeo T, anee
ia ?aaii , a i?ioeaiii neo/aa aaiaeeony nil. Anee
caaeaii aieaa aeaoo ia?aiao?ia, ooieoeey ia ii?aaeaeyaony. Iai?eia?:

(/=10 20) aaiaeeo T

(/=5.43 5.43) aaiaeeo nil

(/=5.43 5.44) aaiaeeo T

4.7 (< …)

Yoi ioiineoaeueiay ooieoeey “iaiaa, /ai”. Iia aaiaeeo T, anee ia?aia
iaiueoa aoi?iai, e nil anee iaiai?io. Anee caaeaii aieaa aeaoo
, T aaiaeeony a oii neo/aa, anee eaaeaeua ec /enae iaiueoa, /ai
ni?aaa io iaai. Iai?eia?:

(< 10 20) aaiaeeo T(< 4 4) aaiaeeo nil(< 357 33.2) aaiaeeo nil(< 2 3 88) aaiaeeo T(< 2 3 4 4) aaiaeeo nil4.8 (<= …)

Yoi ioiineoaeueiay ooieoeey “iaiaa eee ?aaii”. Iia aaiaeeo T, anee
ia?aia iaiaa eee ?aaii aoi?iio e nil a ae?oaeo neo/ayo. Anee
caaeaii aieaa aeaoo , T aaiaeeony a oii neo/aa, anee eaaeaeia
/enei iaiueoa eee ?aaii , noiyuaio ni?aaa io iaai. Iai?eia?:

(<= 10 20) aaiaeeo T(<= 4 4) aaiaeeo T(<= 357 33.2) aaiaeeo nil(<= 2 9 9) aaiaeeo T(<= 2 9 4 5) aaiaeeo nil4.9 (> …)

Yoi ioiineoaeueiay ooieoeey “aieueoa, /ai” . Iia aaiaeeo T, anee
ia?aia aieueoa, /ai aoi?ia e nil, anee iaiai?io. Anee caaeaii
aieueoa aeaoo , T aaiaeeony i?e oneiaee, /oi eaaeaeia /enei
aieueoa noiyuaai ni?aaa. Iai?eia?:

(> 120 17) aaiaeeo T

(> 57 57) aaiaeeo nil

(> 3.5 1792) aaiaeeo nil

(> 77 4 2) aaiaeeo T

(> 77 4 4) aaiaeeo nil

4.10 (>= …)

Yoi ioiineoaeueiay ooieoeey “aieueoa eee ?aaii”. Iia aaiaeeo T, anee
ia?aia aieueoa eee ?aaii aoi?iio, e nil a i?ioeaiii neo/aa. Anee
caaeaii aieueoa aeaoo , T aaiaeeony i?e oneiaee, /oi eaaeaeia
/enei aieueoa eee ?aaii ni?aaa io iaai. Iai?eia?:

(>= 120 17) aaiaeeo T

(>= 57 57) aaiaeeo T

(>= 3.5 1792) aaiaeeo nil

(>= 77 4 4) aaiaeeo T

(>= 77 4 9) aaiaeeo nil

(- )

Yoa ooieoeey aaiaeeo iiae?ac?yaeiue IAO (NOT) (/uea-oi aeiiieiaiea)
. <*enei> aeieaeii auoue oeaeui. Iai?eia?:

(-3) aaiaeeo -4

(-100) aaiaeeo -101

(- -4) aaiaeeo 3

4.12 (1+ )

Yoa ooieoeey aaiaeeo , oaaee/aiiia ia aaeeieoeo (i?e?auaiiia).
<*enei> iiaeao auoue aeaenoaeoaeueiui eee oeaeui. Iai?eia?:

(1+ 5) aaiaeeo 6

(1+ -17.5) aaiaeeo -16.500000

4.13 (1- )

Yoa ooieoeey aaiaeeo , oiaiueoaiiia ia aaeeieoeo
(aeae?aiaioe?iaaiiia). <*enei> iiaeao auoue aeaenoaeoaeueiui eee oeaeui.
Iai?eia?:

(1- 5) aaiaeeo 4

(1- -17.5) aaiaeeo -18.500000

4.14 (abs )

Yoa ooieoeey aaiaeeo aaniethoiia cia/aiea . <*enei> iiaeao
auoue aeaenoaeoaeueiui eee oeaeui. Iai?eia?:

(abs 100) aaiaeeo 100

(abs -100) aaiaeeo 100

(abs -99.25) aaiaeeo 99.250000

4.15 (and …)

Yoa ooieoeey aaiaeeo eiae/aneia E (AND) nienea au?aaeaiee. Iia aaiaeeo
iieue, anee ethaia ec au?aaeaiee au/eneyaony e ioeth, a i?ioeaiii neo/aa
iia aaiaeeo T. Iai?eia?, caaeaiu neaaeothuea iacia/aiey:

(setq a 103)

(setq b nil)

(setq c “string”)

oiaaea:

(and 1.4 a c) aaiaeeo T

(and 1.4 a b c) aaiaeeo nil

4.16 (angle )

Yoa ooieoeey aaiaeeo oaie (a ?aaeeaiao) iaaeaeo 2D oi/eaie e , eiaaea 2D oi/ea – ia?a/aiue aeaoo aeaenoaeoaeueiuo /enae.
Iai?eia?:

(angle ‘(1.0 1.0) ‘(1.0 4.0)) aaiaeeo 1.570796

(angle ‘(5.0 1.33) ‘(2.4 1.33)) aaiaeeo 3.141593

4.17 (angtos [ []])

Yoa ooieoeey aa?ao (aeaenoaeoaeueiue, a ?aaeeaiao) e aaiaeeo aai
io?aaeaeoe?iaai-iui a aeaea no?iee. Ia?aiao? / –
oeaeia /enei; neaaeothuei ia?acii ii aeeeooao oei auiieiyaiiai
?aaeaeoe?iaaiey:

?aaeei ANGTOS Oi?iao ?aaeaeoe?iaaiey

———— ———————

0 A?aaeonu

1 A?aaeonu/ieioou/naeoiaeu

2 A?aaeu

3 ?aaeeaiu

4 Oiiia?aoe/aneea aaeeieoeu

Ia?aiao? / – oeaeia /enei, eioi?ia auae?aao
aeaeaaiia eiee/anoai aeanyoe/iuo ciaeia oi/iinoe. e
niioaaonoaotho nenoaia ia?aiaiuo AUNITS e AUPREC
AaoiEAAea. Anee au i?iioneaaoa ia?aiao?u, aoaeoo i?eiaiyoueny oaeouea
onoaiiaee AUNITS e AUPREC.

Iai?eia?,caaeaiu neaaeothuea iacia/aiey:

(setq pt1 ‘(5.0 1.33))

(setq pt2 ‘(2.4 1.33))

(setq a (angle pt1 pt2))

oiaaea:

(angtos a 0 0) aaiaeeo “180”

(angtos a 0 4) aaiaeeo “180.0000”

(angtos a 1 4) aaiaeeo “180d0’0”

(angtos a 3 4) aaiaeeo “3.1416r”

(angtos a 4 2) aaiaeeo “W”

4.18 (append …)

Yoa ooieoeey aa?ao ethaia eiee/anoai yeaiaioia (/)
e niaaeeiyao eo aianoa a iaeei ia?a/aiue. Iai?eia?

(append ‘(a b) ‘(c d)) aaaaeao (A B C D)

(append ‘((a)(b)) ‘((c)(d)) aaaaeao ((A)(B)(C)(D))

APPEND o?aaoao,/oiau aa ia?aiao?u auee a aeaea nieneia.

4.19 (apply )

Auiieiyao ooieoeeth, ii?aaeaeaiioth / n
ia?aiao?aie, caaeaiiuie a /. Iai?eia?:

(apply ‘ + ‘(1 2 3)) aaiaeeo 6

(apply ‘stract’ (“a” “b” “c”)) aaiaeeo “abc”

APPLY ?aaioaao eae ni ano?iaiiuie (subrs), oae e n ii?aaeaeaiiuie
iieueciaaoaeai (yoe nicaeathony eae n iiiiuueth DEFUN, oae e LAMBDA)
ooieoeeyie.

4.20 (ascii )

Yoa ooieoeey aaiaeeo ia?aoiae ia?aiai neiaiea a aa ciaeiaue
eiae ASCII (oeaeua /enea). Yoi oi aea, /oi e ooieoeey ASC a ycuea
AAENEE. Iai?eia?:

(ascii “A”) aaiaeeo 65

(ascii “a”) aaiaeeo 97

(ascii “BIG”) aaiaeeo 66

4.21 (assoc )

Yoa ooieoeey euao nienie annioeeaoeee aeey aaeeieoeu ()
eae eeth/aaiai yeaiaioa e aaiaeeo niaea?aeeiia . Anee
ia iaeaeai eae eeth/ a , ASSOC aaiaeeo iieue. Iai?eia?,
i?aaeiieiaeei, /oi nienie “al” ii?aaeaeai eae:

((name box) (width 3) (size 4.7263) (depth 5))

oiaaea:

(assoc ‘size al) aaiaeeo (SIZE 4.7263)

(assoc ‘weight al) aaiaeeo nil

Nienie annioeeaoeee /anoi eniieuecoaony aeey caiiieiaiey aeaiiuo,
eioi?ua iiaoo auae?aoueny eae “eeth/”. Yoi iioiaea ia iao?eoeu e
no?oeoo?u a ae?oaeo ycueao i?ia?aiie?iaaiey. Ooieoeey SUBST,
iienaiiay aeaeaa a yoie aeaaa, iaania/eaaao oaeiaiua niiniau ioiaiu
cia/aiee, annioeee?oaiua n iaeiei eeth/ai a ia?a/ia annioeeaoeee.

4.22 (atan [])

Anee ia caaeaaony, ATAN aaiaeeo a?eoaiaain a ?aaeeaiao.
iiaeao auoue io?eoeaoaeueiui, aeeaiacii aaiaeeiuo oaeia io -pt
aei +pt ?aaeeai. Iai?eia?:

(atan 0.5) aaiaeeo 0.463647

(atan 1.0) aaiaeeo 0.785398

(atan -1.0) aaiaeeo -0.785398

(angtos (atan -1.0) 0 4) aaiaeeo “-45.0000”

Anee caaeaiu iaa ia?aiao?a ( e ), aaiaeeony a?eoaiaain
/ a ?aaeeaiao. Anee – iieue, aaiaeeony oaie a
iethn eee ieion 1.570796 ?aaeeai (90 eee -90 a?aaeonia) a caaeneiinoe io
ciaea . Iai?eia?:

(atan 2.0 3.0) aaiaeeo 0.588002

(angtos (atan 2.0 3.0) 0 4) aaiaeeo “33.6901”

(atan 2.0 -3.0) aaiaeeo 2.553590

(angtos (atan 2.0 -3.0) 0 4) aaiaeeo “146.3099”

(atan -2.0 3.0) aaiaeeo -0.588002

(atan -2.0 -3.0) aaiaeeo -2.553590

(atan 1.0 0.0) aaiaeeo 1.570796

(angtos (atan 1.0 0.0) 0 4) aaiaeeo “90.0000

(atan -0.5 0.0) aaiaeeo -1.570796

(angtos (atan -0.5 0.0) 0 2) aaiaeeo “-90.00”

4.23 (atof )

Yoa ooieoeey aaiaeeo i?aia?aciaaiea no?i/ee a aeaenoaeoaeueiua /enea.
Iai?eia?:

(atof “97.1”) aaiaeeo 97.100000

(atof “3”) aaiaeeo 3.000000

4.24 (atoi )

Yoa ooieoeey aaiaeeo i?aia?aciaaiea no?iee a oeaeia /enei.

(atoi “97”) aaiaeeo 97

(atoi “3”) aaiaeeo 3

(atoi “3.9) aaiaeeo 3

4.25 (atom )

Yoa ooieoeey aaiaeeo iieue, anee – nienie, a i?ioeaiii neo/aa
aaiaeeony T. Aeaiiua, iinooiathuea ia a aeaea no?i/ae, i?ioiaeyo eae
atom. Iai?eia?, aeaiu au?aaeaiey:

(setq a ‘(x y z))

(setq b ‘a)

oiaaea:

(atom ‘a) aaiaeeo T

(atom a) aaiaeeo nil

(atom ‘b) aaiaeeo T

(atom b) aaiaeeo T

(atom ‘(a b c)) aaiaeeo nil

Iaeioi?ua aa?eaiou EENIa ?acee/athony a naieo eioa?i?aoaoeeyo ATOMa,
oae /oi iioi?aaeiyeoanue a i?eiaiaiee eiaea i?aia?aciaaiey.

4.26 (Boole …)

Yoi iniiaiay iiae?ac?yaeiay aoeaaay ooieoeey. – oeaeia /enei io 0
aei 15, i?aaenoaaeythuay iaeio ec 16 aiciiaeiuo aoeaauo ooieoeee ia
aeaoo ia?aiaiiuo. Iineaaeiaaoaeueiua ia?aiao?u a aeaea oeaeuo /enae
iiae?ac?yaeii (eiae/anee) neiiaeie?iaaiu, iniiauaaynue ia yoeo
ooieoeeyo e enoeiiinoiie oaaeeoea:

Int1 Int2 Func bit

———————

0 0 8

0 1 4

1 0 2

1 1 1

Eaaeaeue aeo eiaao ia?o niioaaonoaothuaai aeoa ,
auae?ay iaeei ai?eciioaeueiue ?yae enoeiiinoiie oaaeeoeu. Aeo
?acoeueoaoa eee iieue, eee 1, a caaeneiinoe io onoaiiaee aeoa ,
niioaaonoaothuaai yoiio ?yaeo enoeiinoiie oaaeeoeu. Anee
niioaaonoaothuee aeo caaeai a , aeo ?acoeueoaoa 1, a i?ioeaiii
neo/aa aeo ?acoeueoaoa – 0.

Iaeioi?ua cia/aiey aeey yeaeaaeaioiu noaiaea?oiui aoeaaui
iia?aoeeyi AND, OR, XOR e NOT. Iie i?aaenoaaeaiu ieaea:

Ooieoeey Iia?aoeey Aeo ?acoeueoaoa 1,anee…

——————————————————-

1 AND iaa aoiaeiuo aeoa – 1

6 XOR oieueei iaeei ec aeaoo aoiaeiuo aeoia – 1

7 OR ethaie eee iaa ec aoiaeiuo aeoia

8 NOT iaa aoiaeiuo aeoa – 0 (/uea-oi
aeiiieiaiea)

Iai?eia?:

(Boole 1 12 5)

ii?aaeaeyao eiae/aneia AND aeey cia/aiee 12 e 5. ?acoeueoao 4.
Aiaeiae/ii:

(Boole 6 6 5)

ii?aaeaeyao eiae/aneia XOR aeey cia/aiee 6 e 5,a ?acoeueoaoa – 3.

Au iiaeaoa i?eiaiyoue ae?oaea cia/aiey aeey auiieiaiey ae?oaeo
aoeaauo iia?aoeee, aeey eioi?uo yoe eiaia ia yaeythony noaiaea?oiuie.
Iai?eia?, anee – 4 , aeou ?acoeueoaoa caaeaiu, anee caaeaiu
niioaaonoaothuea aeou a , ii ia a . Oaeei ia?acii:

(Boole 4 3 14)

aaaaeao 12.

4.27 (boundp )

Yoa ooieoeey aaiaeeo T, anee eiaao cia/aiea, aeeceia e iaio (ia
ace?ay ia eiioaeno). Anee aea iao cia/aiey, aeeceiai e (eee anee
iii aeecei e ioeth), aaiaeeony iieue. Iai?eia?, caaeaiu iacia/aiey:

(setq a 2)

(setq b nil)

oiaaea:

(boundp ‘a) aaiaeeo T

(doundp ‘b) aaiaeeo nil

4.28 caar, cadr, cddr, cadar, etc.

AaoiEENI iaania/eaaao naycue CAR e CDR aei /aou?ao o?iaiae aaeoaue.
Iai?eia?, caaeaii iacia/aiea:

(setq x ‘((a b) c d))

oiaaea:

(caar x ) yeaeaaeaioii (car (car x)) aaiaeeo A

(cdar x) yeaeaaeaioii (cdr (car x)) aaiaeeo (B)

(cadar x) yeaeaaeaioii (car (cdr (car x))) aaiaeeo B

(cadr x) yeaeaaeaioii (car (cdr x)) aaiaeeo N

(cddr x) yeaeaaeaioii (ndr (ndr x)) aaiaeeo (D)

(caddr x) yeaeaaeaioii (car (cdr (cdr x))) aaiaeeo D

A AaoiEENIa CADR /anoe/ii i?eiaiyaony aeey iieo/aiey eii?aeeiaou Y aeey
oi/ae 2D e 3D ( aoi?ie yeaiaio a nienea ec aeaoo eee o?ao
aeaenoaeoaeueiuo /enae). Aiaeiae/ii, CADDR iiaeao i?eiaiyoueny aeey
ii?aaeaeaiey eii?aeeiaou Z aeey oi/ee 3D. Iai?eia?:

(setq pt2 ‘(5.2 1.0 (2D oi/ea)

(setq pt3 ‘(5.2 1.0 3.0) (3D oi/ea)

oiaaea:

(car pt2) aaiaeeo 5.200000

(cadr pt2) aaiaeeo 1.000000

(caddr pt2) aaiaeeo nil

(car pt3) aaiaeeo 5.200000

(cadr pt3) aaiaeeo 1.000000

(caddr pt3) aaiaeeo 3.000000

4.29 (car )

Yoa ooieoeey aaiaeeo ia?aue yeaiaio . Anee
ionoie, aaiaeeony iieue. Iai?eia?:

(car ‘(a b c)) aaiaeeo A

(car ‘((a b) c)) aaiaeeo (A B)

(car ‘()) aaiaeeo nil

4.30 (cdr )

Yoa ooieoeey aaiaeeo aanue , e?iia aai ia?aiai yeaiaioa. Anee
ionoie, aaiaeeony iieue. Iai?eia?:

(cdr ‘(a b c)) aaiaeeo (B C)

(cdr ‘((a b) c)) aaiaeeo (C)

(cdr ‘()) aaiaeeo nil

Eiaaea ia?aiao?u – ?acaeaeaiiua oi/eie ia?u (ni. ieaea CONS),
CDR aaiaeeo aoi?ie yeaiaio aac aeeth/aiey aai a nienie. Iai?eia?:

(cdr ‘(a . b) aaiaeeo B

(cdr ‘(1 . “Text”) aaiaeeo “Text”

4.31 (chr )

Yoa ooieoeey aaiaeeo ia?aoiae oeaeuo /enae, i?aaenoaaeaiiuo a ciaeiaii
eiaea ASCII, a iaeiiciaeiaoth no?ieo (aiaeiae/ii ooieoeee CHRS a ycuea
AAENEE). Iai?eia?:

(chr 65) aaiaeeo “A”

(chr 66) aaiaeeo “B”

(chr 97) aaiaeeo “a”

4.32 (close )

Yoa ooieoeey cae?uaaao oaee e aaiaeeo iieue. – aeane?eioi?
oaeea (ii?enaoaeue), iieo/aiiue ec ooieoeee OPEN. Iinea CLOSE
aeane?eioi? oaeea ia eciaiyaony, ii noaiiaeony iaaeaenoaeoaeueiui.
Iai?eia?, i?aaenoaaueoa, /oi O – aeaenoaeoaeueiue ioe?uoue aeane?eioi?
oaeea,

(close x )

cae?iao i?aaeiieaaaaiue oaee e aaaaeao iieue.

4.33 (command …)

Yoa ooieoeey auiieiyao eiiaiaeo AaoiEAAea a i?aaeaeao AaoiEENIa e
anaaaea aaiaeeo iieue. Ia?aiao?u, i?aaenoaaeythuea eiiaiaeu AaoiEAAea,
e eo iiaeeiiaiaeu, eaaeaeue ia?aiao? aun/eouaaaony a AaoiEAAe a ea/anoaa
ioaaoa ia iineaaeothuea iiaeneacee. Eiaia eiiaiae e iioeee caioneathony
a aeaea no?i/ae, oi/ee 2D eae nienee ec aeaoo aeaenoaeoaeueiuo /enae
e 3D oi/ee eae nienee ec o?ao aeaenoaeoaeueiuo /enae. Eiaia eiiaiae
ociathony AaoiEAAeii oieueei i?e auoiaea iiaeneacee “Command”.
Iai?eia?:

(setq pt1 ‘(1.45 3.23))

(setq pt2 (getpoint “Enter a point: “))

(command “line” pt1 pt2)

(command “”)

I?aaeiieaaay, /oi iiaeneacea AaoiEAAea “Command” ia auiieiyaony,
oeacaiiay auoa iineaaeiaaoaeueiinoue au?aaeaiee onoaiaaeeaaao cia/aiea
aeey oi/ee “pt1”, auaeaao iiaeneaceo aeey oi/ee “pt2” e auiieiyao
eiiaiaeo AaoiEAAea LINE n aeaoiy oi/eaie eae aeaiiuie aaiaea.
Ia?aiao?aie COMMAND iiaoo auoue no?i/ee, aeaenoaeoaeueiua e oeaeua /enea
eee oi/ee, eae i?aaeoniao?e-aaaony iineaaeiaaoaeueiinoueth iiaeneacee
aeey auiieiaiey eiiaiaeu AaoiEAAea. Ioeaaay no?i/ea (“”)
yeaeaaeaioia ia/aoaiueth i?iaaea ia eeaaeaoo?a. Aucia COMMAND aac
ia?aiao?ia yeaeaaeaioai ia/aoaieth CTR C ia eeaaeaoo?a; yoi ioiaieo
aieueoeinoai eiiaiae AaoiEAAea.

Eiiaiaeu, auiieiyaiua ec ooieoeee COMMAND, ia io?aaeathony ia ye?aia,
anee nenoaia ia?aiaiiuo AaoiEAAea CMDECHO (aua?aiiay ec SETVAR eee
GETVAR) onoaiiaeaia ia ioea. Ooieoeey COMMAND – iniiaiie iaoiae
auai?a eiiaiae AaoiEAAea ec AaoiEENIa.

Aaiaeeiua ooieoeee iieueciaaoaey

“GETxxx” (GETANGLE, GETSTRING, GETINT, GETPOINT) ia iiaoo i?eiaiyoueny
aioo?e ooieoeee. Iiiuoea i?iaeaeaoue yoi, i?eaaaeao a ?acoeueoaoa e
iiyaeaieth niiauaiey:

“ioeaea:caa?aeiaaiiay AaoiEAAeii ooieoeey” e auiieiaiea ooieoeee
i?ae?auaaony. Anee aaiae iieueciaaoaey iaiaoiaeei, ca?aiaa caaeaeoa
ooieoeee GETxxx, eae oeacaii auoa, eee iiianoeoa eo iaaeaeo oaea/iuie
auciaaie ooieoeee COMMAND.

Anee eiiaiaea AaoiEAAea auiieiyaony e no?iea,ninoiyuay ec aaeeie/iiai
ia?oaiai oiaea (“/”), i?in/eouaaaony eae iaeei ec ia?aiao?ia ooieoeee
COMMAND, yoa ooieoeey i?einoaiiaeo i?yiie aaiae iieueciaaoaey (eee
niauaiea). Yoi eaeaioe/ii iaoaiecio iaocu ia?oaiai oiaea, eioi?ui
niaaaeaiu iaith. Iaeiaei, iineieueeo ia?oaue oiae yaeyaony niaoeeaeueiui
eiio?ieueiui ciaeii a EENIa, o?aaoaony aeaa neiaiea ia?oaiai oiaea aeey
oiai, /oiau iieo/eoue iaeei a oaenoiaie no?iea.

Anee au auaeaaoa i?iiaaeooi/iua eiiaiaeu a oi a?aiy, eiaaea ooieoeey
COMMAND i?einoaiiaeaia, iia e inoaaony i?einoaiiaeaiiie. Oai ia iaiaa,
au iiaeaoa auiieiyoue eiiaiaeo ZOOM eee PAN ai a?aiy iaocu ooieoeee
COMMAND. Iaoca nio?aiyaony aei oao ii?, iiea AaoiEAAe iieo/aao
aeaenoaeoaeueiue aaiae e a ?aaioa iao ieeaeeo i?iiaaeooi/iuo eiiaiae.

Iai?eia?:

(command “circle” “5,5” “r” “\\” “line” “5,5” “7,5” “”)

ia/eiaao eiiaiaeo CIRCLE, onoaiaaeeaaao oeaio?aeueioth oi/eo 5,5 e
caoai-iaoca, iicaieythuay niauaoue ?aaeeon ie?oaeiinoe ia ye?aia.
Eiaaea au oeaaeaoa iaiaoiaeeiua oi/ee (eee iaia/aoaaoa iaiaoiaeeiue
?aaeeon), ooieoeey i?iaeieaeaao ?aaioo, ?enoy eeieth io 5,5 aei 7,5.

Iaith aaiaea ia ioiaiyaony iaocie AaoiEENIa. Anee yeaiaio iaith
aeoeaai eiaaea ooieoeey COMMAND iaoiaeeony a iaoca aeey aaiaea, yoi
o?aaiaaiea aaiaea iiaeao auoue oaeiaeaoai?aii i?e iiiiue iaith. Anee au
oioeoa ioiaieoue e yeaiaiou iaith, au aeieaeiu aaanoe ia?oaue
oiae a yeaiaio iaith. Eiaaea iaia?oaeai aeaenoaeoaeueiue aaiae, aoaeoo
i?iaeieaeaoueny eae ooieoeey COMMAND, oae e yeaiaio iaith.

4.34 (cond ( …)

Yoa ooieoeey i?eieiaao a ea/anoaa ia?aiao?ia ethaia eiee/anoai
nieneia. Iia au/eneyao ia?aue yeaiaio eaaeaeiai nienea (a onoaiiaeaiiie
iineaaeiaaoaeueiinoe) iiea iaeei ec yoeo yeaiaioia aaaaeao cia/aiea,
ioee/iia io ioey. Caoai iia au/eneyao oa au?aaeaiey, eioi?ua neaaeotho
ca oanoii, e aaiaeeo cia/aiea iineaaeiaai au?aaeaiey a iiaenienea. Anee
a iiaenienea oieueei iaeii au?aaeaiea (iai?eia?, i?iiouai
),aaiaeeony cia/aiea au?aaeaiey . COND – enoiaeiay
oneiaiay ooieoeey a AaoiEENIa.

Iai?eia?,a yoii neo/aa COND eniieuecoaony aeey auiieiaiey ?an/aoia
aaniethoiiai cia/aiey:

(cond (minusp a) (-a))

(t a)

)

Anee aeey “a” auei onoaiiaeaii cia/aiea -10, aoaeao aaaaeaii 10. Eae
iieacaii, COND iiaeao i?eiaiyoueny eae ooieoeey oeia “case”.
Iauai?eiyoi eniieueciaaoue T eae iineaaeiaa (ii oiie/aieth)
au?aaeaiea. Aeaeaa, ae?oaie i?eia?. Caaeaia ioaaoiay no?iea
iieueciaaoaey a aeaea neiaiea “s”, yoa ooieoeey i?iaa?yao ioaao e
aaiaeeo 1, anee ii “Y” eee “y” e 0, anee ii “N” eee “n”, a inoaeueiuo
neo/ayo -nil (ioeue).

(cond (( = s “Y”) 1)

(( = s “y”) 1)

(( = s “N”) 0)

(( = s “n”) 0)

( t nil)

)

4.35 (cons )

Yoi iniiaiie nienie EIINo?oeoi?a. Ii aa?ao yeaiaio () e nienie (), e aaiaeeo aeiiieiaiea yoiai yeaiaioa a
ia/aei nienea. Iai?eia?:

(cons ‘a ‘(b c d)) aaiaeeo (A B C D)

(cons ‘(a) ‘(b c d)) aaiaeeo ((A) B C D)

Ia?aoeoa aieiaiea, /oi ia?aue yeaiaio iiaeao auoue aoiiii a nienea.
CONS oaeaea aeiioneaao aoii ia ianoi ia?aiao?a a ,
nicaeathuaai no?oeoo?o, ecaanoioth eae dotted pair (oi/a/iay ia?a).
Eiaaea ia ye?ai auaeaaony oi/a/iay ia?a, AaoiEENI ia/aoaao ia?eiae eee
oi/eo iaaeaeo ia?aui e aoi?ui yeaiaioii ia?u. Oi/a/iua ia?u caieiatho
iaiueoa ianoa a iaiyoe, /ai iau/iua nienee; ooieoeey CDR iiaeao
i?eiaiyoueny aeey aaiaea aoi?iai aoiia. Oaeei ia?acii:

(cons ‘a ‘b) aaiaeeo ( A . B)

(car (cons ‘a ‘b)) aaiaeeo A

(cdr (cons ‘a ‘b)) aaiaeeo B

4.36 (cons )

Yoa ooieoeey aaiaeeo eineion , aaea au?aaeai a ?aaeeaiao.
Iai?eia?:

(cos 0.0 ) aaiaeeo 1.000000

(cos pi ) aaiaeeo -1.000000

4.37 (defun …)

DEFUN ii?aaeaeyao ooieoeeth iiae eiaiai (ia?aoeoa aieiaiea, /oi
eiy ooieoeee aaoiiaoe/anee acyoi a oaeiaua neiaee, oae /oi iia ia
aeieaeia caeeth/aoueny iieueciaaoaeai a neiaee). Ca eiaiai ooieoeee
neaaeoao nienie ia?aiao?ia (aiciiaeii ionoie), ca iei einay /a?oa ia
iaycaoaeueia, e eiaia iaeiiai eee aieaa eieaeueiuo neiaieia aeey
ooieoeee. Iineaaeiee ia?aiao? (anee oaeiaie eiaaony) e ia?aue eieaeueiue
neiaie aeieaeiu auoue ioaeaeaiu einie /a?oie eee oioy au iaeiei
i?iaaeii.

Anee ia iauyaeythony ie ia?aiao?u, ie eieaeueiua neiaieu, iinea eiaie
ooieoeee aeieaeiu auoue ionoua e?oaeua neiaee. Iai?eia?:

(defun myfunc (x y)…) (ooieoeey i?eieiaao 2 ia?aiao?a)

(defun myfunc (/a b)…) (ooieoeey eiaao 2 eieaeueiuo neiaiea)

(defun myfunc (x/temp)…) (iaeei ia?aiao? e iaeei eieaeueiue
neiaie)

(defun myfunc ()…) (iao ia?aiao?ia e eieaeueiuo neiaieia)

Neaaeothuea ca nieneii ia?aiao?ia e eieaeueiuo neiaieia iaeii eee
ianeieueei au?aaeaiee au/eneythony i?e auiieiaiee ooieoeee.

Naia ooieoeey DEFUN aaiaeeo eiy ii?aaeaeaiiie ooieoeee. Anee aucaaia
ii?aaeaeaiiay oaeei ia?acii ooieoeey, aa ia?aiao?u aoaeoo au/eneaiu e
ia?aie/aiu (iiaeiaiaiu) ia?aiao?aie neiaieia. Eieaeueiua neiaieu
iiaoo i?eiaiyoueny a ooieoeee aac eciaiaiey eo nayce ia aiaoieo o?iaiyo.
Iinea au/eneaiey ?acoeueoaoa iineaaeiaai au?aaeaiey, ooieoeey aoaeao
aaaaeaia. Ana i?aaeuaeouea au?aaeaiey a ooieoeee eiatho iiai/iue yooaeo.
Naia ooieoeey DEFUN aaiaeeo eiy ii?aaeaeaiiie ooieoeee. Iai?eia?:

(defun add (x y)

(+ x y)

)

(add 10 5) aaiaeeo 15

(add -7 . 4) aaiaeeo 2,60000

e

(defun dots ( x y/temp)

(setq temp (strcat x “…”))

(strcat temp y)

)

(dots “a” “b” ) aaiaeeo “a…b”

(dots “from” “to”) aaiaeeo “from…to”

Ieeiaaea ia i?eiaiyeoa eiy ano?iaiiie ooieoeee eee neiaiea a ea/anoaa
, iineieueeo yoi naeaeaao ano?iaiioth ooieoeeth iaaeinooiiie.

4.37.1. Ooieoeee aeaeeioae e aaoiiaoe/aneay caa?ocea

Ii?aaeaeaiey ooieoeee iiaoo o?aieoueny a oaeea e caa?oaeaoueny i?e
iiiiue ooieoeee LOAD AaoiEENIa (yoa ooieoeey iienaia aeaeueoa a yoie
aeaaa). Anee nouanoaoao oaee “acad.lsp”, AaoiEENI aoaeao caa?oaeaoue
aai aaoiiaoe/anee eaaeaeue ?ac i?e aaaaeaiee a?aoe/aneiai ?aaeaeoi?a
AaoiEAAea; au iiaeaoa i?eiaiyoue yoo ooieoeeth aeey nicaeaiey
aeaeeioaee iieaciuo ooieoeee e aeey nicaeaiey aa?aioee i?enoonoaey yoie
aeaeeioaee.

4.37.2. Ooieoeee N:ooo – aeiiieiaiea eiiaiae AaoiEAAea

Au iiaeaoa aaanoe aeiiieieoaeueiua eiiaiaeu a AaoiEAAe, i?eiaiyy
ooieoeeth DEFUN aeey ii?aaeaeaiey ooieoeee, aaiaeyueo a ?aaioo yoe
eiiaiaeu. Aeey oiai, /oiau i?eiaiyoueny eae eiiaiaeu AaoiEAAea, yoe
ooieoeee aeieaeiu i?eaea?aeeaaoueny neaaeothueo i?aaee:

1. Ooieoeey aeieaeia eiaoue eiy neaaeothuae oi?iu: “N:OOO”, aaea ana
aoeau – aa?oiaai ?aaeno?a. *anoue eiaie “N” aeieaeia i?enoonoaiaaoue
anaaaea, /anoue “OOO” iiaeao auoue eiaiai eiiaiaeu ii aaoaio
auai?o, i?e oneiaee, /oi iia ia aeoaee?oao ieeaeeo eiiaiae AaoiEAAea,
ano?iaiiuo eee aiaoieo.

2. Ooieoeey aeieaeia auoue ii?aaeaeaia n ioeaaui nieneii ia?aiao?ia (ii
eieaeueiua neiaieu iiaoo i?enoonoaiaaoue).

Iai?eia?, ooieoeey: ia?eniaaoue eaaae?ao i?e iiiiue Iieeeeiee
ii?aaeaeyao neaaeothuaa:

(defun C:PSQUARE (‘pt1 pt2 pt3 pt4 len)

(setq pt1 (getpoint “Lower left corner:”))

(setq len (getdist pt1 “Length of one side:”))

(setq pt2 (polar pt1 0.0 len))

(setq pt3 (polar pt2 (‘PI 2.0) len))

(setq pt4 (polar pt3 PI len))

(Command “PLINE” pt1 pt2 pt3 pt4 “C”)

)

Ooieoeee, ii?aaeaeaiiua oaeei ia?acii, iiaoo auoue aucaaiu i?inoi
aaaaeaieai /anoe “OOO” eiaie ooieoeee, i?e iiyaeaiee iiaeneacee
AaoiEAAea “Command:”. Anee “OOO” – iaecaanoiay eiiaiaea, AaoiEAAe
iiiuoaaony aucaaoue ooieoeeth AaoiEENIa “N:OOO” aac ia?aiao?ia.
Iai?eia?, i?e ooieoeee C:PSQUARE aeeaeia aoaeao neaaeothuei:

Nommand: PSQUARE

Lower left corner: (enter a point)

Ieaeiee eaaue oaie: (aaaaeeoa oi/eo)

Length of one side: (enter a distance)

Aeeeia noi?iiu: (aaaaeeoa ?acia?)

Caoai ooieoeey auciaao eiiaiaeo AaoiEAAea PLINE e aaaaeao a aa
iiaeneacee: ia?eniaaoue aeaeaaiue eaaae?ao. Aeiaaaeaiea oaeei ia?acii
eiiaiaeu a AaoiEAAe – i/aiue iiuiia naienoai AaoiEENIa. Iaeiaaeaeu
ii?aaeaeaiiay, iiaay eiiaiaea iiaeao eniieueciaaoue ana naienoaa,
i?aaeinoaaeyaiua AaoiEENIii. Oaeoe/aneia i?eiaiaiea iiaie eiiaiaeu ia
o?aaoao ie?oaeaiey eiaie eiiaiaeu ia?aiao?aie, oae /oi yoa aaaaeaiiay
AaoiEENIii eiiaiaea, i?eiaiyaony oaeaea, eae e ethaay ae?oaay eiiaiaea
AaoiEAAea.

4.38.(distance )

Yoa ooieoeey aaiaeeo ?annoiyiea iaaeaeo 2D oi/eaie e ,
aaea 2D oi/ea – nienie ec aeaoo aeaenoaeoaeueiuo /enae.

Iai?eia?:

(distance ‘(1.0 2.5) ‘(7.7 2.5)) aaiaeeo 6.700000

(distance ‘(1.0 2.5) ‘(3.0 4.0)) aaiaeeo 2.828427

4.39. (eq )

Yoa ooieoeey ii?aaeaeyao, eaeaioe/iu ee e , oi anoue,
iie oaeoe/anee a?aie/ao n iaeiei e oai aea iauaeoii (iai?eia?,SETQ). EQ
aaiaeeo T, anee aeaa au?aaeaiey eaeaioe/iu, a i?ioeaiii neo/aa aaiaeeony
iieue. Iau/ii iia i?eiaiyaony aeey ii?aaeaeaiey oaeoe/aneie
eaeaioe/iinoe aeaoo nieneia. Iai?eia?, aeaiu neaaeothuea iacia/aiey:

(setq f1 ‘(a b c))

(setq f2 ‘(a b c))

(setq f3 f2)

oiaaea:

(eq f1 f2) aaiaeeo iieue (f1 e f2 – ia iaeei e oio aea
nienie!)

(eq f3 f2) aaiaeeo T (f3 e f2 – aaniethoii iaeeiaeiaua
nienee!)

Ni. oaeaea ooieoeeth EQUAL.

4.40 (equal )

Yoa ooieoeey ii?aaeaeyao, ?aaiu ee e , o.a. au/eneythony
ee iie e iaeiiio i?aaeiaoo. Iai?eia?, caaeaiu neaaeothuea iacia/aiey:

(setq f1 ‘(a b c))

(setq f2 ‘(a b c))

(setq f3 f2)

oiaaea:

(equal f1 f2) aaiaeeo T (f1 e f2 au/eneythony e iaeiiio e oiio
aea)

(equal f3 f2) aaiaeeo O (f2 e f3 aaniethoii iaeeiaeiaua nienee)

Ia?aoeoa aieiaiea, /oi a oi a?aiy, eae aeaa nienea ?aaiu, iie iiaoo
auoue iaeaeaioe/iu, aoiiu, eiaaea iie ?aaiu, iie anaaaea eaeaioe/iu. E,
iaeiiaoe, anee ethaua aeaa nienea eee aoiiu eaeaioe/iu, iie anaaaea
?aaiu.

4.41.(eval )

Aaiaeeo ?acoeueoao au/eneaiiuo (au?aaeaiee), aaea – ethaia
au?aaeaiea EENIa. Iai?eia?, caaeaiu iacia/aiey:

(setq a 123)

(setq b ‘a)

oiaaea:

(eval 4.0) aaiaeeo 4.000000

(eval (abs – 10 )) aaiaeeo 10

(eval a) aaiaeeo 123

(eval b) aaiaeeo 123

4.42.(exp )

Yoa ooieoeey aaiaeeo a, aicaaaeaiiia a noaiaiue (iau/iue
aioeeiaa?eoi (antilog)). Iia aaiaeeo aeaenoaeoaeueiua /enea. Iai?eia?,

(exp 1.0) aaiaeeo 2.718282

(exp 2.2) aaiaeeo 9.025013

(exp -0.4) aaiaeeo 0.670320

4.43. (expt)

Yoa ooieoeey aaiaeeo , aicaaaeaiioth a ii?aaeaeaiioth
. Anee iaa ia?aiao?a oeaeua /enea, ?acoeueoao aoaeao oeaeui
/eneii. A i?ioeaiii neo/aa, ?acoeueoao aoaeao aeaenoaeoaeueiui /eneii.
I?eia?u:

(expt 2 4) aaiaeeo 16

(expt 3.0 2.0) aaiaeeo 9.000000

4.44. (fix )

Yoa ooieoeey aaiaeeo i?aia?aciaaiea a aeaenoaeoaeueiia /enei.
<*enei> iiaeao auoue eae oeaeui, oae e aeaenoaeoaeueiui. Anee iii
aeaenoaeoaeueiia, iii onaeaaony aei aeeaeaeoaai oeaeiai /enea iooai
ioa?anuaaiey aeanyoe/iie /anoe. Iai?eia?:

(fix 3) aaiaeeo 3

(fix 3.7) aaiaeeo 3.000000

4.45.(float )

Yoa ooieoeey aaiaeeo i?aia?aciaaiea a aeaenoaeoaeueiia /enei.
<*enei> iiaeao auoue eae oeaeui, oae e aeaenoaeoaeueiui. Iai?eia?:

(float 3) aaiaeeo 3.000000

(float 3.7) aaiaeeo 3.700000

4.46.(foreach )

Yoa ooieoeey i?ioiaeeo /a?ac , i?enaaeaay eaaeaeiio
yeaiaioo e au/eneyao eaaeaeia . Ethaia eiee/anoai iiaeao auoue ii?aaeaeaii.
FOREACH aaiaeeo ?acoeueoao au/eneaiey iineaaeiaai .
Iai?eia?:

(foreach n'(a b c)(print n))

yeaeaaeaioii

(print a)

(print b)

(print c)

e?iia oiai FOREACH aaiaeeo ?acoeueoao oieueei iineaaeiaai
au/eneaiiiai au?aaeaiey.

4.47.(gcd )

Yoa ooieoeey aaiaeeo iaeaieueoee iauee ciaiaiaoaeue e
. <*enei1> e aeieaeiu auoue oeaeuie. Iai?eia?:

(gcd 81 57) aaiaeeo 3

(gcd 12 20) aaiaeeo 4

4.48.(getangle [][]

Aeey iieueciaaoaey yoa ooieoeey i?einoaiaaeeaaao aaiae oaea.
– i?iecaieueiay no?iea, eioi?ay iiyaeyaony ia ye?aia a
ea/anoaa iiaeneacee, a – i?iecaieueiay aaciaay oi/ea 2D. Au
iiaeaoa ii?aaeaeeoue oaie, iaia/aoaa oeeo?o a oaeouai oi?iaoa aaeeieoe
oaea AaoiEAAea. Ioiaoueoa, /oi oioy oaeouee oi?iao aaeeieoe oaea iiaeao
auoue au?aaeai a a?aaeonao, a?aaeao e o.ae., yoa ooieoeey anaaaea
aaiaeeo oaie a ?aaeeaiao.

Au iiaeaoa oaeaea “iieacaoue” AaoiEENIo oaie, ioia/ay oi/eaie aeaa 2D
?aniieiaeaiey ia ye?aia a?aoeee. AaoiEAAe ?enoao eeieth ?aceiiaie ieoe
io ia?aie oi/ee aei iiceoeee oaeouaai ia?ae?anoey, /oi iiiiaeao aai
i?e aecoaeece?iaaiee oaea.

Iaiaycaoaeueiue ia?aiao? ooieoeee GETANGLE (anee ii ii?aaeaeai)
i?aaeiieaaaaony auoue ia?aie ec yoeo aeaoo oi/ae, iicaieyy aai
“iieacaoue” AaoiEENIo” oaie, ioia/ay aua iaeio oi/eo. Aucia GETANGLE
aeaiiino?e?oao neaaeothuaa:

(setq ang (getangle))

(setq ang (getangle ‘(1.0 3.5))

(setq ang (getangle “Which way?”)

(setq ang (getangle ‘(1.0 3.5)”Which way?”)

Au ia iiaeaoa aaanoe ae?oaia au?aaeaiea EENIa a ea/anoaa ioaaoa ia
o?aaiaaiea GETANGLE. Iiiuoea naeaeaoue yoi i?eaaaeao e niiauaieth
“Can’t reenter Autolisp” (Ia iiao iiaoi?ii aaanoe AaoiEENI”). Ni.
oaeaea GETORIENT e INITGET.

4.49. (getcorner [])

Ooieoeey GETCORNER aaiaeeo oi/eo oae aea, eae e GETPOINT. Iaeiaei,
GETCORNER o?aaoao ia?aiao? oi/ee e /a?oeo i?yiioaieueiee ec
oi/ee ii ia?a ia?aiauaiey iieueciaaoaeai ia?ana/aiey ia
ye?aia. Aeey aeaoaeueiiai iciaeiieaiey ni. GETPOINT e INITGET. A
ea/anoaa ioaaoa ia o?aaiaaiea GETCORNER, au ia iiaeaoa aaanoe ae?oaia
au?aaeaiea EENIa.

4.50.(getdist [][])

Aeey iieueciaaoaey yoa ooieoeey i?einoaiaaeeaaao aaiae ?annoiyiey.
– i?iecaieueiay no?iea, eioi?ay iiyaeyaony ia ye?aia a
ea/anoaa iiaeneacee, a – i?iecaieueiay aaciaay oi/ea. Au iiaeaoa
ii?aaeaeeoue ?annoiyiea, iaia/aoaa oeeo?o a oaeouai oi?iaoa aaeeieoe
?annoiyiey AaoiEAAea. Ioiaoueoa, /oi oioy oaeouee oi?iao aaeeieoe
?annoiyiey iiaeao auoue au?aaeai a oooao, aetheiao (a?oeoaeoo?iue), yoa
ooieoeey anaaaea aaiaeeo ?annoiyiea a aeaenoaeoaeueiuo /eneao.

Au iiaeaoa “iieacaoue” AaoiEENIo ?annoiyiea, ioiaoea oi/eaie aeaa
?aniieiaeaiey ia a?aoe/aneii ye?aia. AaoiEAAe ?enoao eeieth ?aceiiaie
ieoe io ia?aie oi/ee aei iiceoeee oaeouaai ia?ae?anoey, /oi iiiiaeao
aai i?e aecoaeece?iaaiee ?annoiyiey. Iaiaycaoaeueiue ia?aiao? ooieoeee GETDIST (anee ii ii?aaeaeai) i?aaeiieaaaaony auoue ia?aie ec
yoeo aeaoo oi/ae, iicaieyy aai “iieacaoue” AaoiEENIo ?annoiyiea,
ioia/ay aua iaeio oi/eo.

Neaaeothuea i?eia?u eeethno?e?otho i?eiaiaiea GETDIST.

(setq dist (getdist))

(setq dist (getdist ‘(1.0 3.5))

(setq dist (getdist “How far?”)

(setq dist (getdist ‘(1.0 3.5)”How far?”)

Au ia iiaeaoa aaanoe ae?oaia au?aaeaiea EENIa a ea/anoaa ioaaoa ia
o?aaiaaiea GETDIST. Ni. oaeaea INITGET.

4.51.(getint[])

Aeey iieueciaaoaey yoa ooieoeey i?einoaiaaeeaaao aaiae oeaeuo /enae e
aica?auaao yoi oeaeia /enei. – i?iecaieueiay no?iea,
eioi?ay iiyaeyaony ia ye?aia a ea/anoaa iiaeneacee.

Iai?eia?:

(setq num (getint))

(setq num (getint “Enter a number:”)) (Aaaaeeoa /enei)

Au ia iiaeaoa aaanoe ae?oaia au?aaeaiea EENIa a ea/anoaa ioaaoa ia
o?aaiaaiea GETINT. Ni. oaeaea INITGET.

4.52.(getkword [])

Ooieoeey GETKWORD o?aaoao io iieueciaaoaey eeth/aaiai neiaa. Ia?aae
auciaii GETKWORD, onoaiaaeeaaaony nienie aeaenoaeoaeueiuo eeth/aauo
neia, i?eiaiyy ooieoeeth INITGET (iienaiioth ieaea). GETWORD
aaiaeeo eeth/aaia neiai, au?aaieaay a no?ieo aaiae iieueciaaoaey.
AaoiEAAe iiaoi?eo iiiuoeo, anee aaiae ia niioaaonoaoao iaeiiio ec yoeo
eeth/aauo neia. Ionoie (ioeaaie) aaiae aaaaeao ioeue (anee yoi
aeiionoeii). Ioeue oaeaea aaiaeeony, anee nicaeaia no?iea eeth/aauo
neia. Iai?eia?:

(initgent 1 “Yes Ni”)

(setq x (getkword “Are you sure? (Yes or No)”))

iiaeneaaeao iieueciaaoaeth e onoaiiaeo neiaie O eae aeey “Yes”, oae e
aeey “No”, a caaeneiinoe io ioaaoa iieueciaaoaey. Anee iiaeneacea
ia niioaaonoaoao ie iaeiiio ec eeth/aauo neia, eee anee
iieueciaaoaeue ioaa/aao ioeai, AaoiEAAe iii?ineo iieueciaaoaey
iiaoi?eoue i?ioeaaeo?o.

Au ia iiaeaoa aaanoe ae?oaia au?aaeaiea EENIa a ea/anoaa ioaaoa ia
o?aaiaaiea GETKWORD. Ni. oaeaea INITGET.

4.53.(getorient [][])

A AaoiEENIa oaeu anaaaea i?aaenoaaeaiu a ?aaeeaiao, n iai?aaeaieai a
iieue-?aaeeai ai?aai ( ainoie) e oaeii, oaaee/eaathueiny a iai?aaeaiee
i?ioea /aniaie no?aeee. Oaeei ia?acii, aoaeoo eiaoue ianoi iaeioi?ua
i?aia?aciaaiey, anee iieueciaaoaeue auaa?ao ?acee/iua ioeue-a?aaeoniua
aacu eee ?acee/iua iai?aaeaiey aeey oaaee/aiey oaea iin?aaenoaii
eiiaiaeu INITS eee nenoai ia?aiaiiuo ANGBASE e ANGDIR.

GETORIENT iioiae ia ooieoeeth GETANGLE, ii iaoiaeeony iiae aeeyieai
ioeue-a?aaeoniie aacu e iai?aaeaiey aeey oaaee/aiey oaea nianai
ii-ae?oaiio, /ai GETANGLE. GETANGLE aeieaeia i?eiaiyoueny a oii neo/aa,
eiaaea aai iaiaoiaeeia aaee/eia a?auaiey (ioiineoaeueiue oaie),
oiaaea eae GETORIENT aeieaeia i?eiaiyoueny aeey iieo/aiey i?eaioaoeee
(aaniethoiue oaie).

I?aaenoaaueoa, /oi eiiaiaea AaoiEAAea INITS i?eiaiyeanue aeey auai?a
ioeue-a?aaeoniie aacu 90 a?aaeonia (naaa?) e iai?aaeaiey aeey
oaaee/aiey oaea – ii /aniaie no?aeea. A oaaeeoea iieacaii, /oi aaaaeoo
ooieoeee GETANGLE e GETORIENT (a ?aaeeaiao) aeey ?ai?acaioeaiiai aaiaea
ia?aiaiiuo iieueciaaoaeai (a a?aaeonao).

Input (degrees) GETANGLE GETORIENT

0 0.000000 1.570796

90 1.570796 3.141593

180 3.141593 4.712389

90 (-90 270?) 4.712389 0.000000

Eae iieacaii a oaaeeoea, GETANGLE i?eieiaao ia ia?aaioeo iai?aaeaiea
oaaee/aiey oaea, ii eaii?e?oao iieue-a?aaeonioth aaco. Oaeei ia?acii,
au iiaeaoa i?eiaiyoue GETANGLE aeey iieo/aiey aaee/eiu a?auaiey i?e
aaiaea/anoaaea aeiea, oae eae aaiae ioeue-a?aaeona anaaaea aaaaeao
iieue ?aaeeai. N ae?oaie noi?iiu, GETORIENT i?eieiaao ia ia?aaioeo
eae iieue-a?aaeonioth aaco, oae e iai?aaeaiea oaaee/aiey oaea. Oaeei
ia?acii, au aeieaeiu i?eiaiyoue GETORIENT aeey iieo/aiey oaeeo oaeia,
eae oaie aaciaie eeiee aeey Yeaiaioa Oaenoa. Iai?eia?, aeey caaeaiiuo
auoa onoaiiaie UNITS, i?eaioaoeey aaciaie eeiee aeey ii?iaeueiie
ai?eciioaeueiie eeiee oaenoa aoaeao 90 a?aaeonia.

Au ia iiaeaoa aaanoe ae?oaia au?aaeaiea EENIa a ea/anoaa ioaaoa ia
o?aaiaaiea GETORIENT. Ni. oaeaea GETANGLE e INITGET.

4.54. (getpoint [] [])

Aeey iieueciaaoaey yoa ooieoeey i?einoaiaaeeaaao aaiae oi/ee.
iaiaycaoaeueiay aaciaay oi/ea, a – i?iecaieueiay no?iea,
eioi?ay iiyaeyaony ia ye?aia a ea/anoaa iiaeneacee. Au iiaeaoa
ii?aaeaeeoue oi/eo iieioa?ii eee iaia/aoaa eii?aeeiaoo a oaeouai
oi?iaoa aaeeieoe. Anee i?enoonoaoao ia?aiao? iaiaycaoaeueiie aaciaie
oi/ee , AaoiEAAe /a?oeo eeieth ?aceiiaie ieoe io yoie oi/ee aei
iiceoeee oaeouaai ia?ae?anoey. Iai?eia?:

(setq p (getpoint))

(setq p (getpoint “Where?”)) “Aaea?”

(setq p (getpoint ‘(1.5 2.0) “Second point:”)

Iau/ii GETPOINT aaiaeeo oi/eo 2D (nienie ec aeaoo aeaenoaeoaeueiuo
/enae). I?eiaiyy ooieoeeth INITGET aeey onoaiiaee eiio?ieueiie
ioiaoee “oi/ea.3D”, au iiaeaoa canoaaeoue GETPOINT aaanoe oi/eo 3D
(nienie ec o?ao aeaenoaeoaeueiuo /enae).

Au ia iiaeaoa aaanoe ae?oaia au?aaeaiea EENIa a ea/anoaa ioaaoa ia
o?aaiaaiea GETPOINT. Ni. oaeaea GETCORNER e INITGET.

4.55.(getreal [])

Aeey iieueciaaoaey yoa ooieoeey i?einoaiaaeeaaao aaiae aeaenoaeoaeueiiai
/enea e aica?auaao yoi aeaenoaeoaeueiia /enei.
i?iecaieueiay no?iea, eioi?ay iiyaeyaony ia ye?aia a ea/anoaa
iiaeneacee. Iai?eia?:

(setq val (getreal)

(setq val (getreal “oaeoi? oeaeu:”)

Au ia iiaeaoa aaanoe ae?oaia au?aaeaiea EENIa a ea/anoaa ioaaoa ia
o?aaiaaiea GETREAL. Ni. oaeaea INITGET.

4.56.(getstring [][])

Aeey iieueciaaoaey yoa ooieoeey i?einoaiaaeeaaao aaiae no?iee e aaiaeeo
yoo no?ieo. Anee caaeai e ii ia ?aaai ioeth, aaiaeeiay no?iea
iiaeao niaea?aeaoue i?iaaeu (e aeieaeia iiyoiio auoue caaa?oaia
iaaeaoeai RETURN). A ae?oaeo neo/ayo aaiae no?iee caaa?oaaony
i?iaaeii eee RETURN. – i?iecaieueiay no?iea,
iiyaeythuayny ia ye?aia a ea/anoaa iiaeneacee. Iai?eia?:

(setq s (getstring))

(setq s (getstring “What’s your first name?”))

(setq s (getstring T “What’s your full name?”))

Anee aaiae iieueciaaoaey aeieaeai auoue iaeiie ec ianeieueeeo iioeee
(eeth/aauo neia), aianoi GETSTRING iiaeao i?eiaiyoueny iienaiiay
?aiaa ooieoeey GETKWORD.

Au ia iiaeaoa aaanoe ae?oaia au?aaeaiea EENIa a ea/anoaa ioaaoa ia
o?aaiaaiea GETSTRING.

4.57.(getvar )

Yoa ooieoeey iouneeaaao cia/aiey nenoaiiuo ia?aiaiiuo AaoiEAAea. Eiy
ia?aiaiiie aeiaeii auoue caeeth/aii a aeaieiua eaau/ee “”. Iai?eia?,
i?aaeiieiaeei, /oi naiue iineaaeiee ec ii?aaeaeaiiuo iaie ?aaeeon
ie?oaeaiey aue 0.25 aaeeieoe:

(getvar “FILLETRAD”) aaaaeao 0.250000

Nienie oaeoueo nenoaiiuo ia?aiaiiuo AaoiEAAea iiaeii iaeoe a
i?eeiaeaieyo A eieae iieueciaaoaey AaoiEAAea. Ni. oaeaea ooieoeeth
SETVAR.

4.58.(graphscr)

Ooieoeey GRAPHSCR ia?aeeth/aaony n oaenoiaiai ye?aia ia a?aoe/aneee
a iaeii-ye?aiiuo nenoaiao (oeia ooieoeeiiaeueiie eeaaeoe “Flip screen”
a AaoiEAAea). GRAPHSCR anaaaea aaiaeeo iieue. Ni. oaeaea ooieoeeth
TEXTSCR.

4.59.(if )

Yoa ooieoeey oneiaii au/eneyao au?aaeaiey. Anee ia iieue,
oiaaea iia au/eneyao , a i?ioeaiii neo/aa iia au/eneyao
. Iineaaeiaa au?aaeaiea () – iaiaycaoaeueiia. IF
aaiaeeo cia/aiea aua?aiiiai au?aaeaiey; anee i?iiouaii, a
?aaii ioeth, IF aaiaeeo iieue. Iai?eia?:

(if (=1 3)”Yes!!” “No”) aaiaeeo “No”

(if (=2 (+1 1)) “Yes!!”) aaiaeeo “Yes!!”

(if (=2 (+3 4)) “Yes!!”) aaiaeeo nil

4.60.(initget [][])

Yoa ooieoeey nicaeaao ?acee/iua iioeee aeey aeaeueiaeoaai
eniieueciaaiey eo ooieoeeae GETxxx (e?iia GETSTRING e GETVAR). INTGET
anaaaea aaiaeeo iieue. Iaiaycaoaeueiue ia?aiao? – oeaeia /enei
ni neaaeothueie cia/aieyie:

INITGET Bits Cia/aiea

1 ia aeiioneaao ioeaaie aaiae

2 ia aeiioneaao ioeaaua cia/aiey

4 ia aeiioneaao io?eoeaoaeueiuo cia/aiee

8 ia i?iaa?yao a?aieoeu,aeaaea anee aeaenoaoao limcheck

16 aaiaeeo oi/ee 3D ?aiueoa,/ai oi/ee 2D

Aeou iiaoo neeaaeuaaoueny aianoa a ethaie eiiaeiaoeee aeey nicaeaiey
cia/aiee io 0 aei 31. Anee iieueciaaoaeue i?e aaiaea ii?aaeaeaiiuo
?aaeeiia ioeaaaony (iai?eia?, aaiaeeo ioeaaia cia/aiea, eiaaea iii ia
aeiioneaaony), AaoiEAAe auaeano ia ye?ai niiauaiea e iii?ineo
iieueciaaoaey iiaoi?eoue iiiuoeo. Iai?eia?:

(initget (+ 1 2 4))

(setq age (getint “How old are you?”) : aic?ano
“Neieueei aai eao?”

iieo/eo aic?ano iieueciaaoaey, aaoiiaoe/anee iiaoi?ea iiiuoeo, anee
iieueciaaoaeue aaaaeao iieue, io?eoeaoaeueiia /enei eee ioeaaia
cia/aiea. Anee ia?aiao? ia caaeai, i?aaeiieaaaaony iieue (iao
?aaeeiia). Niaoeeaeueiua eiio?ieueiua cia/aiey i?eieiathony ia ia?aaioeo
oieueei oaie ooieoeeyie GETxxx, aeey eioi?uo iie eiatho niune (eae
iieacaii a oaaeeoea):

Ooieoeey INITGET control bits honored (i?eieiaaiua ia ia?aaioeo
eiio?ieueiua aaeou ooieoeee INITGET)

No null No zerro No neg. No limits 3D hoints

GETINT ( ( (

GETREAL ( ( (

GETDIST ( ( (

GETANGLE ( ( (

GETORIENT ( ( (

GETPOINT (

( (

GETCORNER (

( (

GETKWORD (

GETSTRING

GETVAR

Iaiaycaoaeueiue ia?aiao? ooieoeee INITGET ii?aaeaeyao nienie
eeth/aauo neia iioeee, eioi?ua aoaeoo i?iaa?aiu neaaeothueie
o?aaiaaieyie GETxxx, anee iieueciaaoaeue ia aaae iaeeaeaaiue oei aeaiiuo
aaiaea (iai?eia?, oi/eo aeey GETPOINT). Anee aaiae iieueciaaoaey
niioaaonoaoao iaeiiio ec eeth/aauo neia yoiai nienea, yoi
eeth/aaia neiai aaiaeeony n iiiiuueth ooieoeee GETxxx eae ?acoeueoao
ooieoeee STRING. I?ia?aiia iieueciaaoaey iiaeao eiio?iee?iaaoue
eeth/aaua neiaa e auiieiyoue aeaeaaiua aeaenoaey aeey eaaeaeiai ec
ieo. Anee aaiae iieueciaaoaey ia iaeeaeaaiiai oeia e ia niioaaonoaoao
ie iaeiiio ec eeth/aauo neia, AaoiEAAe iii?ineo iiaoi?eoue iiiuoeo.
Nienie eeth/aauo neia aeieaeai auoue neaaeothuae oi?iu: “KEY1 KEY2 KEY3
ABBREV3”. Ioaeaeueiua eeth/aaua neiaa ii?aaeaeaiu i?iaaeaie.
Nie?auaiey (aaa?eaeaoo?a) iaiaycaoaeueiu, anoue aeaa iaoiaea eo
ii?aaeaeaiey.

Iaiaoiaeeiay /anoue iiaeao auoue iaienaia caaeaaiuie aoeaaie, a
inoaeueiay – n i?eiaiaieai ieaeiaai ?aaeno?a; eee iaiaoiaeeiay /anoue
iiaeao auoue iiaoi?aia, ioaeaeaiiay io eeth/aaiai neiaa caiyoie.
Aoi?ie niinia i?aaeiacia/ai aeey iaeaa/aiey i?eiaiaiey eiino?aiiuo
ycueia, aaea ia?aeeth/aiea ?aaeno?ia iiaeao auoue cao?oaeiaii eee aiiaua
iaaiciiaeii. A eaaeaeii iaoiaea aeeeia iaiaoiaeeiie /anoe –
ieieiaeueiay aeeeia, eioi?ay aeieaeia oi/ii niioaaonoaiaaoue. (Aeey
iaoiaea ?acaeaeeoaey-caiyoie i?aaeiieaaaaony, /oi no?iea aaa?aaeaoo?u –
i?aaeeueiia iiaeiiiaeanoai ia/aea eeth/aaiai neiaa).

Iai?eia?: “LTYPE,LT” e “LType” – yeaeaaeaioiua niaoeeoeeaoeee.
Eaaeaeay icia/aao, /oi aaiaeu iieueciaaoaey oeia “LTYPE”, “LTYP”, “LTY”
eee “LT” i?eiaiyaiu, ii “L”- iaaeinoaoi/ii, a “LTSCALE” e “LTYPEX” ia
niioaaonoaotho.

?anniio?ei neaaeothuea, ii?aaeaeaiiua iieueciaaoaeai ooieoeee

(defun getnum (ix)

(initget 1 “Pi Two-pi”)

(setq x (getreal “Pi/Two-pi/:”))

(cond((eqx “Pi”) pi)

((eq x “Two-pi”)(*2.0 pi))

(T x)

)

)

Yoio INITGET cai?auaao ioeaaie aaiae e nicaeaao nienie ec aeaoo
eeth/aauo neia “Pi” e “TWO-Pi”. Caoai i?eiaiyaony GETREAL aeey
iieo/aiey oeaeuo /enae, ecaeaaay iiaeneaceo “Pi/Two-pi/:”,
?acoeueoao ia?aiauaiey a eieaeueiii neiaiea O.

Anee iieueciaaoaeue aaiaeeo /enei, yoi /enei aica?auaaony ooieoeeae
GETNUM. Iaeiaei, anee iieueciaaoaeue aaiaeeo eeth/aaia neiai “Pi” (
eee i?inoi “P”), ooieoeey GETPOINT aica?auaao eeth/aaia neiai “Pi”.
Ooieoeey COND iaia?oaeeaaao yoi e, a aeaiiii neo/aa, aaiaeeo cia/aiea
Pi. Eeth/aaia neiai “Two-pi” ia?aaaouaaaony aiaeiae/ii. Nicaeaiiua n
iiiiuueth INITGET eiio?ieueiua iiiaoee e eeth/aaua neiaa i?eiaiythony
oieueei ni neaaeothuei GETxxx auciaii, a caoai aaoiiaoe/anee
ioa?anuaathony. Yoi iicaieyao i/enoeoue niaoeeaeueiue ?aaeei i?e
iaiaoiaeeiinoe auciaa ae?oaie ooieoeee.

4.61.(inters [])

Ooieoeey INTERS enneaaeoao aeaa eeiee e aaiaeeo oi/eo eo ia?ana/aiey,
eee iieue, anee iie ia ia?anaeathony. e – eiia/iua oi/ee
ia?aie eeiee, a e – eiia/iua oi/ee aoi?ie eeiee. Anee
i?enoonoaoao iaiaycaoaeueiue ia?aiao? e ii ?aaai ioeth,
eeiee n/eoathony aaneiia/iuie ii aeeeia, INTERS aaiaeeo oi/eo
ia?ana/aiey aeaaea anee iia iaoiaeeony aia eiioea iaeiie eee iaaeo
eeiee. Anee ia?aiao? iiouai eee ii – iieue, oi/ea ia?ana/aiey
aeieaeia iaoiaeeoueny ia iaaeo eeieyo eee INTERS aaaaeao iieue.
Iai?eia?, caaeaii:

(setq a'(1.0 1.0) b'(9.0 9.0))

(setq c'(4.0 1.0) d'(4.0 2.0))

oiaaea:

(inters a b c d) aaaaeao nil

(inters a b c d T) aaaaeao nil

(inters a b c d nil)aaaaeao (4.000000 4.000000)

4.62.(itoa )

Yoa ooieoeey aaiaeeo ia?aoiae oeaeuo /enae a no?ieo. Iai?eia?:

(itoa 33) aaiaeeo “33”

(itoa -17) aaiaeeo “-17”

4.63 (lambda …)

LAMBDA ii?aaeaeyao “aiiieiioth” ooieoeeth. Iau/ii iia i?eiaiyaony
eiaaea caaieiaie i?e ii?aaeaeaiee iiaie ooieoeee ia au?aaiai. Iia
oaeaea iiiauaao ooieoeeth ia oi ianoi, aaea iia aeieaeia i?eiaiyoueny.
LAMBDA aaiaeeo cia/aiea iineaaeiaai e /anoi i?eiaiyaony
aianoa n APPLY e/eee MAPCAR aeey auiieiaiey ooieoeee a nienea.
Iai?eia?:

(apply ‘(lambda (x y z)

(* x (-y z)

)

‘(5 20 14)

) aaiaeeo 30

eee:

(mapcar ‘(lambda (x)

(setq counter (1 + counter))

(* x 5)

)

‘(24 -6 10.2)

) aaiaeeo (10 20 -30 51.000000)

4.64.(last)

Yoa ooieoeey aaiaeeo iineaaeiee yeaiaio . aeieaeai
auoue ia ioeaaui. Iai?eia?:

(last ‘(a b c d e)) aaiaeeo E

(last ‘(a b c (d e))) aaiaeeo (DE)

Eae iieacaii, LAST iiaeao aaiaeeoue eae aoii, oae e nienie. Ia
ia?aue acaeyae iiaeao iieacaoueny,/oi LAST- ioee/iue niinia iieo/aiey
eii?aeeiaou Y oi/ee. Iiea yoi enoeiii aeey 2D oi/ee (nienie ec aeaoo
aeaenoaeoaeueiuo /enae), LAST aaaaeao eii?aeeiaoo Z aeey 3D oi/ee. Aeey
oiai,/oiau aaoa ooieoeey ?aaioaea eae neaaeoao, caaeaaay oi/ee 2D e 3D,
iu niaaooai aai i?eiaiyoue CADR aeey iieo/aiey eii?aeeiaou Y e CADDR
aeey iieo/aiey eii?aeeiaou Z.

4.65.(length )

Yoa ooieoeey aaiaeeo oeaeia /enei, iaicia/athuaa iiia? yeaiaioa a
. Iai?eia?:

(length ‘(a b c d) aaiaeeo 4

(length ‘(a b (c d)) aaiaeeo 3

(length ‘()) aaiaeeo 0

4.66.(list …)

Yoa ooieoeey aa?ao ethaia eiee/anoai au?aaeaiee () e niaaeeiyao
eo aianoa, aaiaey nienie. Iai?eia?:

(list ‘a ‘b ‘c) aaiaeeo (A B C)

(list ‘a ‘(d c) ‘d) aaiaeeo (A (B C) D)

(list 3.9 6.7) aaiaeeo (3.90000 6.70000)

A AaoiEENIa yoa ooieoeey /anoi i?eiaiyaony aeey ii?aaeaeaiey ia?aiaiiuo
oi/ae 2D e 3D (nienie ec aeaoo eee o?ao aeaenoaeoaeueiuo /enae).

4.67. (listp )

Yoa ooieoeey aaiaeeo T, anee – nienie, e nil a i?ioeaiii neo/aa.
Iai?eia?:

(listp ‘(a b c)) aaiaeeo T

(listp ‘a) aaiaeeo nil

(listp 4.343) aaiaeeo nil

4.68.(load )

Yoa ooieoeey caa?oaeaao oaee au?aaeaiee AaoiEENIa e au/eneyao yoe
au?aaeaiey. – no?iea, eioi?ay i?aaenoaaeyao eiy oaeea
aac ?anoe?aiey (?anoe?aiea “.lsp” aeiioneaaony). iiaeao
aeeth/aoue i?aoeen n eaoaeiaii, eae a “/function/test1”
(“ooieoeey/oano 1”). A nenoaiao MS-DOS/PC-DOS oaeaea aeiioneaaony eiy
iaeiieoaey (iai?eia?, a: c:) e au iiaeaoa eniieueciaaoue ia?oaue oiae
aianoi i?aaeoanoaothuae einie /a?ou (ii iiiieoa, /oi au aeieaeiu
i?eiaiyoue “\\” aeey iieo/aiey iaeiie einie /a?ou a no?iea).

Anee iia?aoeey oaea/ia, LOAD aaiaeeo eiy iineaaeiae ii?aaeaeaiiie a
oaeea ooieoeee. Anee iia?aoeey aeaao naie, LOAD aaaaeao eiy oaeea a
aeaea no?iee.

Iai?eia?, i?aaeiieiaeei, /oi oaee “/fred/test1.lsp” niaea?aeeo DEFUN
ooieoeee MY-FUNN, a oaee “test2.lsp” ia nouanoaoao:

(load “/fred/test1”) aaiaeeo MY-FUNC

(load “test2” aaiaeeo “test”

Ooieoeey LOAD ia iiaeao auoue aucaaia aioo?e ae?oaie ooieoeee EENIa.
Iia aeieaeia auoue aaaaeaia iaiin?aaenoaaiii n eeaaeaoo?u (eee ec
iaith, eee oaeea noeaia?ey /script file/), iiea ia aeoeaia ieeaeay
ae?oaay ooieoeey EENIa.

Eaaeaeue ?ac, eiaaea ia/eiaaony naain ?aaiou a?aoe/aneiai ?aaeaeoi?a
AaoiEAAea, AaoiEENI caa?oaeaao oaee “acad.lsp”, anee ii nouanoaoao. Au
iiaeaoa caienaoue ia yoio oaee ii?aaeaeaiea eee iaeaieaa /anoi
oiio?aaeyaiua eiiaiaeu, iie aoaeoo au/eneyoueny aaoiiaoe/anee eaaeaeue
?ac, eiaaea au ia/iaoa ?aaeaeoe?iaaoue /a?oaae.

4.69.(log )

Yoa ooieoeey aaiaeeo a aeaea aeaenoaeoaeueiiai /enea anoanoaaiiue log
. Iai?eia?:

(log 4.5) aaiaeeo 1.504077

(log 1.22) aaiaeeo 0.198850

4.70.(logand …)

Yoa ooieoeey aaiaeeo ?acoeueoao eiae/aneiai iiae?ac?yaeiiai AND/E
nienea . <*enea> aeieaeiu auoue oeaeuie, ?acoeueoao oaeaea
aoaeao oeaeui /eneii. Iai?eia?:

(logand 7 15 3) aaiaeeo 3

(logand 2 3 15) aaiaeeo 2

(logand 8 3 4) aaiaeeo 0

4.71.(logior )

Yoa ooieoeey aaiaeeo ?acoeueoao eiae/aneiai iiae?ac?yaeiiai
aeeth/athuaai OR/EEE nienea . <*enea> aeieaeiu auoue oeaeuie,
?acoeueoao aoaeao oaeaea oeaeui /eneii. Iai?eia?:

(logior 1 2 3) aaiaeeo 7

(logior 9 3) aaiaeeo 11

4.72.(lsh )

Yoa ooieoeey aaiaeeo eiae/aneia iiae?ac?yaeiia niauaiea
aeoaie . <*enei1> e aeieaeiu auoue oeaeuie
/eneaie, ?acoeueoao oaeaea oeaeia /enei. Anee
iieiaeeoaeueiia /enei, niauaaony aeaai, anee io?eoeaoaeueiia
– ai?aai. A iaieo neo/ayo “ioeaaua” aeou niauathony aioo?ue, a aeou,
naeaeaaaiua ia?oaeo aac nio?aiaiey auaeaeaaaiuo ?ac?yaeia, ia
o/eouaathony (shift in/shift out). Anee “iaeei” aeo niauai aioo?ue eee
ia?oaeo (into/out) io aa?oeiu (16-iai ) aeoa oeaeiai /enea, aai ciae
iaiyaony. Iai?eia?:

(lsh 2 1) aaiaeeo 4

(lsh 2 -1) aaiaeeo 1

(lsh 40 2) aaiaeeo 160

(lsh 16384 1) aaiaeeo -32768

4.73.(mapcar )

MAPCAR aaiaeeo ?acoeueoao auiieiaiiie n eiaeeaeaeoaeueiuie
yeaiaioaie /a?ac , iiaeaaaaiua eae ia?aiao?u
. Eiee/anoai aeieaeii niioaaonoaiaaoue eiee/anoao
ia?aiao?ia, o?aaoaiuo . Iai?eia?:

(mapcar ‘1+'(10 20 30) aaiaeeo (11 21 31)

Yoi yeaeaaeaioii

(1 + 10)

(1 + 20)

(1 + 30)

E?iia yoiai MAPCAR aaiaeeo nienie ?acoeueoaoia. Aiaeiae/ii:

(mapcar ‘+'(10 20 30)'(4 3 2) aaiaeeo (14 23 32)

yeaeaaeaioii:

(+10 4)

(+20 3)

(+30 2)

Ooieoeey LAMBDA iiaeao ii?aaeaeeoue “aiiieiioth” ooieoeeth, eioi?oth
auiieieo MAPCAR. Yoi iieacii, eiaaea iaeioi?ua ia?aiao?u ooieoeee –
eiinoaiou eee iiaeathony iaeioi?uie ae?oaeie iooyie. Iai?eia?:

(mapcar ‘(lambda (x)(+ x 3))'(10 20 30) aaiaeeo (13 23 33)

e

(mapcar ‘(lambda (x y z)

(* x (-y z)

)

‘(5 6)'(20 30)'(145.0)

) aaiaeeo (30 150.000000)

4.47.(max …)

Yoa ooieoeey aaiaeeo naiia aieueoia ec caaeaiiuo . Eaaeaeia
iiaeao auoue aeaenoaeoaeueiui eee oeaeui. Iai?eia?:

(max 4.07 -144) aaiaeeo 4.070000

(max -88 19 5 2) aaiaeeo 19

4.75.(member )

Yoa ooieoeey euao ec eiathueony a iaee/ee e
aaiaeeo inoaoi/iua /eaiu , ia/eiay n ia?aiai, eiathuaainy a
iaee/ee . Anee a iao ioaeiuo , MEMBER
aaiaeeo iieue. Iai?eia?:

(member ‘c ‘(a b c d e) aaiaeeo (C D E)

(member ‘q ‘(a b c d e) aaiaeeo nil

4.76.(menucmd )

Ooieoeey MENUCMD niaaaeaao n?aaenoaaie i?ia?aiiu aeey ia?aeeth/aiey
iaaeaeo iiaeno?aieoeaie a iaith AaoiEAAea. Oaeei ia?acii, i?ia?aiia
EENIa iiaeao ?aaioaoue ai acaeiiaeaenoaee n iauaaeeiaiiui oaeeii iaith,
eaaeaeue ?ac i?e iaiaoiaeeiinoe aaiaea iieueciaaoaey, auaiaey ia ye?ai
niioaaonoaothuea iiaeiaith aa?eaiou/aeueoa?iaoeau. Ia?aiao?
ooieoeee MENUCMD eiaao neaaeothuoth oi?io:

section – submenu (naeoeey – iiaeiaith)

aaea

section ii?aaeaeyao naeoeeth/?acaeae iaith. Aeaenoaeoaeueiu
neaaeothuea eiaia:

S – aeey iaith ye?aia (SCREEN)

B – aeey eeaaeoiiai iaith (BUTTONS)

T1-T4 – aeey iaith ieaioaoa (TABLET) io 1 aei 4

A1 – aeey AUXI iaith.

submenu ii?aaeaeyao eaeia ec iiaeiaith aeoeaii. Eiy aeieaeii auoue eee
iaeiei ec ciaeia/iaicia/aiee iaith (aac “**”) a oaeouai caa?oaeaiiii
oaeea iaith, eee eiaiai naeoeee iniiaiiai iaith. Aeey aeaeueiaeoae
eioi?iaoeee ni. Aeaao 5. Ia?aoeoa aieiaiea, /oi ia/aeueiay “S”,
i?eiaiyaiay aeey nnueee ia iiaeiaith a oaeea iaith, caeanue ia
i?eiaiyaony. Iai?eia?:

(menucmd “S = OSNAP”)

auciaao ia ye?ai iiaeiaith “OSNAP” (i?aaeiieaaay, /oi oaeia iiaeiaith
nouanoaoao a oaeouai oaeea iaith). Aiaeiae/ii:

(menucmd “B” = “MY-BUTTONS”)

ii?aaeaeeo “MY-BUTTONS” aeey eiiii/iiai iaith. MENUCMD anaaaea
aaiaeeo nil.

4.77.(min …)

Yoa ooieoeey aaiaeeo naiia iaeaiueeia ec caaeaiiuo . Eaaeaeia
aeieaeii auoue aeaenoaeoaeueiui eee oeaeui. Iai?eia?:

(min 683 -10.0) aaiaeeo -10.000000

(min 73 2 48 5) aaiaeeo 2

4.78.(minusp )

Yoa ooieoeey aaiaeeo T, anee – aeaenoaeoaeueiia eee oeaeia
/enei e au/eneyaony e io?eoeaoaeueiiio cia/aieth, eia/a iia aaiaeeo nil.
Aeey ae?oaeo oeiia ooieoeey ia ii?aaeaeyaony. Iai?eia?:

(minusp -1) aaiaeeo T

(minusp -4.293) aaiaeeo T

(minusp 830.2) aaiaeeo nil

4.79.(not )

Yoa ooieoeey aaiaeeo T, anee au?aaeaiea – ioeaaia e iieue a i?ioeaiii
neo/aa. Eae i?aaeei, ooieoeey NULL i?eiaiyaony aeey nieneia, a NOT
i?eiaiyaony aeey ae?oaeo oeiia aeaiiuo a ni/aoaiee n iaeioi?uie oeiaie
eiio?iey ooieoeee. Iai?eia?, caaeaiu neaaeothuea iacia/aiey:

(setq a 123)

(setq b “string”)

(setq c nil)

oiaaea:

(not a) aaiaeeo nil

(not b) aaiaeeo nil

(not c) aaiaeeo T

(not ‘()) aaiaeeo T

4.80.(nth )

Yoa ooieoeey aaiaeeo “nth” yeaiaio , aaea – iiia?
aaiaeeiiai yeaiaioa (ioeaaie – ia?aue yeaiaio). Anee aieueoa, /ai
caaeaii a , aaiaeeony nil. Iai?eia?:

(nth 3 ‘(a b c d e)) aaiaeeo D

(nth 0 ‘(a b c d e)) aaiaeeo A

(nth 5 ‘(a b c d e) aaiaeeo nil

4.81.(null )

Yoa ooieoeey aaiaeeo O, anee aeecie e ioeth, eia/a iia aaaaeao
nil. Iai?eia?, caaeaiu neaaeothuea iacia/aiey:

(setq a 123)

(setq b “string”)

(setq c nil)

oiaaea:

(nul a) aaiaeeo nil

(nul b) aaiaeeo nil

(nul c) aaiaeeo T

(nul ‘()) aaiaeeo T

4.82.(numberp )

Yoa ooieoeey aaiaeeo T, anee – oeaeia eee aeaenoaeoaeueiia
/enei, eia/a iia aaiaeeo iieue. Iai?eia?, caaeaiu iacia/aiey:

(setq a 123)

(setq b ‘a)

oiaaea:

(numberp 4 ) aaiaeeo T

(numberp 3.8348) aaiaeeo T

(numberp “Howdy”) aaiaeeo nil

(numberp ‘a) aaiaeeo nil

(numberp a) aaiaeeo T

(numberp b) aaiaeeo nil

(numberp (eval b)) aaiaeeo T

4.83.(open )

Yoa ooieoeey ioe?uaaao oaee aeey ia?auaiey e iaio I/O ooieoeee
AaoiEENIa. Iia aaiaeeo aeane?eioi? oaeea, eioi?ue aoaeao i?eiaiyoueny
ae?oaeie I/O ooieoeeyie, iiyoiio ii aeieaeai ia/eiaoueny n setq.
Iai?eia?:

(setq a(open “file.ext” “r”))

– no?iea, ii?aaeaeythuay eiy e ?anoe?aiea ioe?uaaaiiai
oaeea. – iiiaoea aeey /oaiey/iaienaiey. Ii aeieaeai auoue a
aeaea no?iee, ninoiyuae eo aaeeie/iuo aoea ieaeiaai ?aaeno?a.
Aeaenoaeoaeueiua aeey mode aoeau iienaiu a neaaeothuae oaaeeoea:

IPEN mode Iienaiea

“r” Ioe?uo aeey /oaiey. Anee ia nouanoaoao, aaiaeeony iieue

“w” Ioe?uo aeey iaienaiey. Anee ia nouanoaoao, nicaeaaony
e ioe?uaaaony iiaue oaee. Anee nouanoaoao, aai nouanoaothuea
aeaiiua ia?aieooony.

“a” Ioe?uo aeey aeiiieiaiee. Anee ia nouanoaoao, nicaeaaony e
ioe?uaaaony iiaue oaee. Anee oaea nouanoaoao, ii ioe?uaaaony
e aeiiieiyaony iiceoeey a eiioea nouanoaothueo aeaiiuo, oae ethaua iiaua
aeaiiua, caienaiiua a oaee, aoaeoo aeiaaaeaiu e nouanoaothuei aeaiiui.

A nenoaiao DOS, iaeioi?ua i?ia?aiiu e oaenoiaua ?aaeaeoi?u caienuaatho
oaeeu oaenoa n ia?ea?ii eiiaoe-oaeea (CTRL Z, aeanyoe/iue ASCII eiae 26)
a eiioea oaenoa. I?e i?i/oaiee oaenoiaiai oaeea DOS aaiaeeo noaoon
eiiaoe-oaeea, anee eiaaony ia?ea? CTRL Z , aeaaea anee iinea iaai
eiathony aua aeaiiua. Anee au iaia?aiu i?eiaiyoue “a” ?aaeei ooieoeee
OPEN aeey aeiiieiaiey aeaiiuo a oaee nicaeaiiue ae?oaie i?ia?aiiie,
i?iaa?ueoa, /oiau ae?oaay i?ia?aiia ia eniieueciaaea ia?ea? CTRL Z a
eiioea naieo oaenoiauo oaeeia.

I?aaenoaaueoa, /oi a aeaiiuo i?eia?ao eiai oaeeia ia nouanoaoao:

(setq f(open “new.tst” “w”)) aaiaeeo

(setq f(open “nouch.fil” “r”)) aaiaeeo nil

(setq f(open “logfile” “a”)) aaiaeeo

iiaeao niaea?aeaoue i?yiie i?aoeen, eae a “test/func3” A
nenoaiao MS-DOS oaeaea aeiioneaaony oi?aaeythuay aoeaa; au iiaeaoa
eniieueciaaoue ia?aoioth einoth /a?oo aianoi i?yiie /a?ou (ii iiiieoa,
/oi au aeieaeiu i?eiaiyoue “\\” aeey iieo/aiey a no?iea iaeiie einie
/a?ou). Iai?eia?:

(setq f(open “/x/new.tst” “w”) aaiaeeo

(setq f(open nosuch.fil” “r”) aaiaeeo nil

4.84.(or ..)

Yoa ooieoeey aaiaeeo eiae/aneia OR/EEE aeey nienea au?aaeaiee. Anee
ana au?aaeaiey au/eneythony e ioeth EEE aaiaeeo iieue, a i?ioeaiii
neo/aa aaiaeeo O. Iai?eia?:

(or nil ‘a ‘()) aaiaeeo T

(or nil ‘()) aaiaeeo nil

4.85.(osnap )

Yoa ooieoeey aaiaeeo oi/eo, eioi?ay yaeyaony ?acoeueoaoii i?eiaiaiey
?aaeeiia oeenaoeee (snap) iauaeoa, iienaiiiai e oi/ea . – no?iea, ninoiyuay ec iaeiiai eee aieaa
aeaenoaeoaeueiuo caoeene?iaaiiuo iauaeoia, ii?aaeaeaiiua eae
“midpoint”, “center” e o.ae., ioaeaeaiiua caiyouie. Iai?eia?:

(setq pt2 (osnap pt1 “midp”))

(setq pt2 (osnap pt1 “midp,endp,center”)

Anee ia?aiao? -oi/ea 2D (nienie ec aeaoo aeaenoaeoaeueiuo /enae),
aaiaeeony oi/ea 2D. Anee ia?aiao? oi/ea 3D (nienie ec o?ao
aeaenoaeoaeueiuo /enae), aaiaeeony oi/ea 3D. Anee a iniaia ia iaoiaeeony
oi/ee, ii?aaeaeaiiie /?aaeeiii, aeey caaeaiiie oi/ee ,
aaiaeeony iieue.

4.86. pi

Yoi ia ooieoeey, a eiinoaioa pi. Iia au/eneyaony i?eaeeceoaeueii
3,1415926.

4.87.(polar )

Yoa ooieoeey aaiaeeo oi/eo iiae oaeii ia ?annoiyiee
io oi/ee . Oi/ea – nienie ec aeaoo aeaenoaeoaeueiuo /enae, oaie
au?aaeai a ?aaeeaiao. Iai?eia?:

(polar ‘(1.0 1.0) 0.785398 1.414214)

aaiaeeo (2.000000 2.000000)

4.88. (prin1[])

Yoa ooieoeey ia/aoaao au?aaeaiea ia ye?aia e aaiaeeo .
iiaoo auoue ethaua au?aaeaiey, ii iie ia aeieaeiu auoue
no?ieie. Anee i?enoonoaoao (e anee yoi aeane?eioi? aeey
oaeea,ioe?uoiai aeey iaienaiey), a oaeea oi/ii oae, eae
iii aeieaeii iiyaeoueny ia ye?aia. Ia/aoathony oieueei caaeaiiua
, iiaua eeiee eee i?iaaeu ia aeeth/athony. Iai?eia?,
caaeaiu neaaeothuea iacia/aiey:

(setq a 123)

(setq b ‘(a))

oiaaea

(prin1 ‘a) ia/aoaao A e aaiaeeo A

(prin1 a) ia/aoaao 123 e aaiaeeo 123

(prin1 b) ia/aoaao (A) e aaiaeeo (A)

(prin1 “Hello”) ia/aoaao “Hello” e aaiaeeo “Hello”

Eaaeaeue ec i?eia?ia ia/aoaaony ia ye?aia, eae oieueei ii?aaeaeyaony
. I?aaenoaaueoa, /oi F – aeaenoaeoaeueiue
aeane?eioi? oaeea, ioe?uoiai aeey iaienaiey:

(prin1 “Hello” f)

iaieoao “Hello” a caaeaiiue oaee e aaaaeao “Hello”.

Anee – no?iea, niaea?aeauay eiio?ieueiua neiaieu, PRIN1
io?aaeaeoe?oao yoe neiaieu eaau/eaie ” “.

\e aeey escape ia?aoiae

\n aeey newline iiaay eeiey

\r aeey return aica?ao,aaiae

\t aeey tab oaaoeyoeey

\nnn aeey neiaieia,/ae ainueie?e/iue eiae nnn

Oaeei ia?acii:

(prin1 (chr 2)) ia/aoaao “\002” e aaiaeeo “\002”

(prin1 (chr 10)) ia/aoaao “\n” e aaiaeeo “\n”

4.89.(princ [])

Yoa ooieoeey oaeay aea, eae PRIN1, e?iia oiai, /oi eiio?ieueiua
neiaieu a ia/aoathony aac ?anoe?aiey. A iauai, PRIN1 ?ac?aaioai
aeey iaienaiey au?aaeaiee a oaeii aeaea, /oiau iie auee niaianoeiu n
ooieoeeae LOAD , a oi a?aiy eae PRINC aoaeao ia/aoaoue eo a i?eaiaeiii
aeey /oaiey ooieoeeae READ-LINE aeaea.

4.90. (print [])

Yoa ooieoeey oaeay aea, eae PRIN1, e?iia oiai, /oi iiaua eeiee
ia/aoathony ia?aae , a a i?iiaaeooea ia/aoaaony neaaeothuaa
au?aaeaiea.

4.91. (progn …)

Yoa ooieoeey iineaaeiaaoaeueii au/eneyao eaaeaeia e
aaiaeeo cia/aiea iineaaeiaai au?aaeaiey. Au iiaeaoa i?eiaiyoue PROGN
aeey au/eneaiey ianeieueeeo au?aaeaiee, aaea i?aaeoniao?eaaaony oieueei
iaeii au?aaeaiea. Iai?eia?:

(if (=a b) (progn

(setq a (+a 10)

(setq b (-b 10)

)

Ooieoeey IF ii?iaeueii au/eneyao iaeii au?aaeaiea “then”, anee
oanoiaia au?aaeaiea au/eneyaony e /aio-eeai ioee/iiio io ioey. A yoii
i?eia?a iu i?eiaiyee PROGN aeey au/eneaiey aeaoo au?aaeaiee aianoi
ia?aiia/aeueiiai.

4.92.(prompt )

Yoa ooieoeey aunaa/eaaao ia ye?aia a ciia iiaeneacie
/niiauaiea e aaiaeeo iieue. – no?iea. A aeaooye?aiiie
eiioeao?aoeee AaoiEAAea, ooieoeey PROMPT aunaa/eaaao ia iaieo
ye?aiao e iiyoiio i?aaeii/oeoaeueia aeey PRINC. Iai?eia?:

(prompt “New value:”)

ia ye?aiao iiyaeony “New value:” e aaiaeeony iieue.

4.93.(quote )

Aaiaeeo iaau/eneyaiia . Iia oaeaea iiaeao auoue caienaia
neaaeothuei ia?acii:

‘expr

Iai?eia?:

(quote a) aaiaeeo A

(quote cat) aaiaeeo CAT

(quote (a b)) aaiaeeo (A B)

‘a aaiaeeo A

‘cat aaiaeeo CAT

‘(a b) aaiaeeo (A B)

4.94. (read )

Yoa ooieoeey aaiaeeo ia?aue ia?a/aiue eee aoii, iieo/aiiua ec
. ia aeieaeia niaea?aeaoue i?iaaeia. Iai?eia?:

(read “hello”) aaiaeeo HELLO

(read “hi”) aaiaeeo HI

(read “(a)”) aaiaeeo (A)

4.95.(read-char [])

Yoa ooieoeey /eoaao aaeeie/iue neiaie ec aooa?a aaiaea eeaaeaoo?u eee
ec ioe?uoiai oaeea, iienaiiiai a . Iia aaiaeeo (oeaeia
/enei) ASCII eiae, i?aaenoaaeythuee aiciiaeiinoue i?i/anoue neiaie.

Anee ia ii?aaeaeai, a a aooa?a aaiaea eeaaeaoo?u iao
neiaieia, READ-CHAR aeaeao, iiea au /oi-eeai iaia/aoaaoa n eeaaeaoo?u
(nii?iaiaeaeay caienue eeaaeoae RETURN !). Iai?eia?, i?aaeiieiaeei, /oi
aooa? aaiaea eeaaeaoo?u iono:

(read-char)

aoaeao aeaeaoue, /oiau /oi-oi auei aaaaeaii. Anee au iaia/aoaaoa “A B
C”, a caoai iaaeiaoa RETURN, READ-CHAR aaaaeao 65 (eiae ASCII aeey
aoeau “A”). Ia neaaeothuea auciau READ-CHAR aaaaeao 66, 67 e 10 (iiaay
eeiey) niioaaonoaaiii. Anee caoai aoaeoo i?iecaaaeaiu neaaeothuea
auciau READ-CHAR, iia iiyoue aoaeao aeaeaoue aaiae.

4.96. (read-line [])

Yoa ooieoeey /eoaao no?ieo n eeaaeaoo?u eee ec ioe?uoiai oaeea,
iienaiiiai a . Anee eiiaoe oaeea ia au/eneyaony, READ-LINE
aaiaeeo iieue, a i?ioeaiii neo/aa iia aaiaeeo no?ieo, eioi?ay auea
i?i/eoaia. I?aaeiieiaeei, /oi F – aeaenoaeoaeueiue iieioa? ioe?uoiai
oaeea:

(read-line f)

aaaaeao neaaeothuoth aoiaeioth eeieth ec oaeea, eee iieue, anee aue
aeinoeaioo eiiaoe oaeea.

4.97 (redraw [[]])

Yooaeo ooieoeee caaeneo io eiee/anoaa caaeaiiuo ia?aiao?ia. Anee aucia
aac ia?aiao?ia,

(redraw)

ii ia?a?enoao aanue /a?oaae, eae eiiaiaea AaoiEAAea REDRAW. Anee aucia
n ia?aiao?ii eiaie iauaeoa,

(redraw )

ia?a/a?/ai aoaeao aua?aiiue iauaeo. Yoi iieacii i?e ii?aaeaeaiee iauaeoa
ia ye?aia iinea i?eiaiaiey GRCLEAR aeey i/enoee ye?aia.

Caaa?oaiea eiio?iey iaae ia?a/a?/eaaieai iauaeoa inouanoaeyaony auciaii
REDRAW n aeaoiy ia?aiao?aie:

()

aaea – eiy iauaeoa, eioi?ue aoaeao ia?a/a?/ai, a – oeaeia
/enei n iaeiei ec neaaeothueo cia/aiee:

Redraw Mode Action/aeaenoaea

1 Ia?a/a?oeoue iauaeo ia ye?aia

2 Oie/oiaeeoue iauaeo (aianoe i?iaaeu)

3 Aunaa/eaaiea iauaeoa (anee iicaieyao aeenieae)

4 Ioiaia aunaa/eaaiey iauaeoa (anee iicaieyao aeenieae)

Anee – caaieiaie eee eiiieaeniue iauaeo (Iieeeeiey eee Aeie n
aeiiieiaieyie), aeaaiue iauaeo e ana aai iiaeiauaeou aoaeoo
io?aaaouaaoueny, anee ia?aiao? iieiaeeoaeueiue. Anee ia?aiao?
io?eoeaoaeueiue, oi?aaeyaiue ooieoeeae REDRAW aoaeao oieueei
iaeei caaieiaie. Anee ioeaie iao, REDRAW anaaaea aaiaeeo iieue.

4.98.(rem …)

Yoa ooieoeey aeaeeo ia e aaiaeeo inoaoie ( au/eneyao
inoaoie ). mod mod – iiaeoeue iia?aoeey au/eneaiey
inoaoea.

REM iiaeao i?eiaiyoueny n aeaenoaeoaeueiuie e oeaeuie /eneaie ni
noaiaea?oiuie i?aaeeaie ia?aaiaea. Iai?eia?:

(rem 42 12) aaiaeeo 6

(rem 12.0 16) aaiaeeo 12.000000

(rem 60 3) aaiaeeo 0

4.99.(repeat …)

A yoie ooieoeee i?aaenoaaeyao ethaia ec iieiaeeoaeueiuo oeaeuo
/enae. Ooieoeey au/eneyao eaaeaeia eiee/anoai ?ac e
aaiaeeo cia/aiea iineaaeiaai au?aaeaiey. Iai?eia?, caaeaiu iacia/aiey:

(setq a 10)

(setq b 100)

oiaaea:

(repeat 4

(setq a(+ a 10)))

(setq b(+ b 10)))

) aaiaeeo 140

4.100.(reverse )

Yoa ooieoeey aaiaeeo n ca?aca?ae?iaaiiuie yeaiaioaie.
Iai?eia?:

(reverse ‘((a)b c)) aaiaeeo (C B (A))

4.101. (rtos [])

Yoa ooieoeey aaiaeeo no?ieo, eioi?ay yaeyaony i?aaenoaaeaieai
(aeaenoaeoaeueiiai) niaeanii n onoaiiaeaie / ?aaeei e /oi/iinoue e ia?aiaiiie, caaeathuae ?acia?u AaoiEAAea
DIMZIN. e – oeaeua /enea, eioi?ua auae?atho
eeiaeiua yeaiaiou ?aaeeia e oi/iinoe. Ieaea ia?a/eneaiu iaania/aiiua
cia/aiey :

RTOS ?aaeei ?aaeaeoe?oaiue oi?iao

1 Iao/iue

2 Aeanyoe/iue

3 I?eeeaaeiie (ooou e aeanyoe/iua aetheiu)

4 A?oeoaeoo?iue (ooou e ae?iaiua aetheiu)

5 I?iecaiaeiua ae?iaiua yeaiaiou

Ia?aiao?u e niioaaonoaotho nenoaia ia?aiaiiuo LUNITS
e LUPREC AaoiEAAea. Anee au i?iioneaaoa ia?aiao?u, aoaeoo
i?eiaiyoueny oaeouea onoaiiaee LUPREC e LUNITS. I?eia?u RTOS:

(rtos 17.5 1 4) aaiaeeo “1.7500E+01”

(rtos 17.5 2 2) aaiaeeo “17.50”

(rtos 17.5 3 2) aaiaeeo “1′-5.50″”

(rtos 17.5 4 2) aaiaeeo “1′-5 1/2″”

(rtos 17.5 5 2) aaiaeeo “17 1/2”

Aeaaa 5. ?ac?aaioea eioa?oaenia iieueciaaoaey

5.1. Iaith iieueciaaoaey

Iaith iieueciaaoaey neoaeeo aeey ?anoe?aiey e aeiiieiaiey nouanoaothuaai
e ?ac?aaioee nianoaaiiiai iaith. Iaith iieueciaaoaey caaeaaony a oaeea
iaith.Oaeeu iaith i?aaenoaaeytho niaie oaenoiaua oaeeu.

Enoiaeiua oaeeu iaith eiatho ?anoe?aiea .mnu. Eiiieee?iaaiiua oaeeu
eiatho ?anoe?aiea .mnx. LISP-oaeeu iaith eiatho ?anoe?aiea .mnl. Yoe
oaeeu aaoiiaoe/anee caa?oaeathony a iaiyoue i?e caa?ocea oaeea iaith n
oaeei aea eiaiai e niaea?aeao LISP-au?aaeaiey, eioi?ua iiaoo
eniieueciaaoueny oaeeii iaith. Oaeeu ii?aaeaeaiey iaith eiatho
?anoe?aiea .mnd. Iie yaeythony niaoeeaeueiuie enoiaeiuie oaeeaie,
niaea?aeaueie iae?inu. Oaeeu yoiai oeia eiiieee?othony n iiiiuueth
i?ia?aiiu mc, eioi?ay ?aciauaia a eaoaeiaa SAMPLE.

Oaee .mnu eiiieee?oaony, e nicaeaaony oaee n ?anoe?aieai .mnx, eioi?ue
eiaao eiiiaeoiue aioo?aiiee oi?iao, iicaieyao cia/eoaeueii auno?aa
inouanoaeyoue caa?oceo iaith. I?e nicaeaiee iiaiai ?enoiea oaee iaith n
eiaiai, oeacaiiui a ?enoiea-i?ioioeia, caa?oaeaaony aaoiiaoe/anee.
AaoiEAAe i?aaeinoaaeyao aiciiaeiinoue caiaieoue yoi iaith ia iiaia. Aeey
eiiieeyoeee e caa?ocee iaith eniieuecoaony eiiaiaea menu (iaith). I?e
yoii AaoiEAAe caienuaaao a oaee ?enoiea eiy iineaaeiaai
eniieueciaaaoaainy n iei iaith; i?e iineaaeothuai ?aaeaeoe?iaaiee yoiai
?enoiea iaith caa?oaeaaony aaoiiaoe/anee. Eiiaiaea menu caa?oaeaao oaee
iaith n aeenea:

Command: MENU

Aeey caaeaiey eiaie oaeea ia ye?ai auaiaeeony noaiaea?oiia aeeaeiaiaia
ieii oaeeia n caaieiaeii «Auai? oaeea iaith». AaoiEAAe euao oaee n
?anoe?aieai .mnu, anee ii iaeaeai, oi euao oaee n ?anoe?aieai .mnx, e
anee MNX-oaee eiaao oa aea aeaoo e a?aiy nicaeaiey, /oi e MNU-oaee, ii
caa?oaeaaony AaoiEAAeii. Eia/a eiiieee?oaony MNU-oaee e caa?oaeaaony
MNX-oaee. Anee MNU-oaee ia iaeaeai, AaoiEAAe euao MNX-oaee. Anee
MNX-oaee iaeaeai, AaoiEAAe aai caa?oaeaao, eia/a aunaa/eaaaony niiauaiea
ia ioeaea e cai?in ia aaiae ae?oaiai oaeea iaith.

Anee ioeeth/aia nenoaiiay ia?aiaiiay FILEDIA, iiaeii ainiieueciaaoueny
eiiaiaeiie no?ieie aeey caa?ocee iaith:

Command: MENU : (Eiiaiaea: IAITH)

Menu file name or . for none : : (Eiy oaeea iaith eee .
anee iii ia ioaeii :

Eiy oaeea caaeaaony aac ?anoe?aiey.

Eiiaaea eiaao niune iieiinoueth oa?aoue iaith, iai?eia?, aeey i/enoee
ciiu ye?aiiiai iaith. Aeey yoiai iaiaoiaeeii aaanoe «.» a ioaao ia
cai?in eiiaiaeu MENU.

5.2. No?oeoo?a oaeea iaith

Oaee iaith iiaeii eiae/anee ?acaeoue ia ?acaeaeu, eaaeaeue ec eioi?uo
ioiineony e iaeioi?iio ono?ienoao, iiaeaea?aeeaathuaio ?aaioo n iaith, e
niaea?aeeo eiiaiaeiua no?iee, i?aaeiacia/aiiua aeey yoiai ono?ienoaa.
?acaeaeu eaeaioeoeoee?othony n iiiiuueth iaoie ?acaeaeia:

***SCREEN – ye?aiiia iaith;

***BUTTONSn – eiiii/iia iaith ono?ienoaa oeacaiey, aaea n – /enei io 1
aei 4;

***AUXn – aeiiieieoaeueiia eiiii/iia iaith, aaea n – /enei io 1 aei 4;

***POPn – iaaeathuea e eo?ni?iua iaith, aaea n – /enei io 1 aei 16;

***ICON – a?aoe/aneia iaith;

***TABLETn – iaeanoue iaith ieaioaoa, aaea n – /enei io 1 aei 4.

Iaoee ii?aaeaeytho, /oi niioaaonoaothuea ioieou iaith aei iaoee
neaaeothuaai ?acaeaea eee aei eiioea oaeea ioiinyony e eiie?aoiiio
?aaioathuaio n iaith ono?ienoao. Iai?eia?:

***SCREEN

[Help]help

[Bye]end

***BUTTONS

erase

oops

Ioieou iaith «Help» e «Bye» ioiinyony e iaith ye?aia, a ioieou «erase» e
«oops» – e eiiii/iiio iaith. Anee a oaeea iao iaoee «***SCREEN», oi
nenoaia AaoiEAAe aeaenoaoao oae, eae aoaeoi «***SCREEN» yaeyaony ia?aie
iaoeie a oaeea.

5.3. Iiaeiaith

Iieueciaaoaeth i?aaeinoaaeyaony aiciiaeiinoue ii?aaeaeyoue iiaeiaith,
eioi?ua i?aaenoaaeytho niaie a?oiiu ec ioieoia iaith, aeoeaece?iaaoue eo
e naeaeaoue aeinooiiuie aeey auai?a iieueciaaoaey. Iai?eia?, auai?
ioieoa «ARC» ec iiaeiaith «DRAW» iiaeao aeoeaece?iaaoue iiaeiaith,
eioi?ia niaea?aeeo aa?eaiou eniieiaiey eiiaiaeu ARC. Ioieou
aeiiieieoaeueiiai iaith a?aiaiii caiaiytho ana eee /anoue oaeouaai
iaith. Iau/ii ii ieii/aiee eniieueciaaiey iiaeiaith i?ienoiaeeo
aica?auaiea e i?aaeuaeouaio iaith. Iiaeiaith iiaoo auoue aeiaeaiiuie.

Ia/aei iiaeiaith caaeaaony iaoeie iiaeiaith. Iia eiaao neaaeothuee
oi?iao:

** .

Eiy iaith i?aaenoaaeyao niaie iineaaeiaaoaeueiinoue ec ia aieaa /ai 31
neiaiea, niaea?aeauoth aoeau, oeeo?u, a oaeaea niaoeeaeueiua neiaieu
«$», «-» (aeaoen), «_» (iiae/a?eeaathuay /a?oa). Iaoea iiaeiaith
aeieaeia iaoiaeeoueny a ioaeaeueiie no?iea oaeea iaith e ia aeieaeia
niaea?aeaoue i?iaaeia. Eaaeaeia eiy iiaeiaith a i?aaeaeao oaeea aeieaeii
auoue oieeaeueiui, iai?eia?:

**MOVE 3

[MOVE:]^C^CMOVE

Window

Last

Previous

Crossing

Remove

Add

Undo

aaea eiy «**MOVE» aaaaeaii aeey iiaeiaith eiiaiaeu MOVE. Caaieiaie
[MOVE:] oeacuaaao, /oi yoi eiiaiaea e aa auai? auciaao auiieiaiea
eiiaiaeu MOVE.

Iiaeiaith iiaeao niaea?aeaoue ethaia eiee/anoai ioieoia, ii n o/aoii
aiciiaeiinoae ono?ienoaa, n eioi?iai caaeaaony iaith. Iai?eia?, a iaith
ye?aia iaiaoiaeeii o/eouaaoue, /oi ia ye?aia iaeiia?aiaiii iiaeii
ioia?aceoue oieueei 20 ioieoia.

I?e aeoeaecaoeee iiaeiaith aai ioieou iau/ii caiauatho ioieou
i?aaeuaeouaai iaith. Iai?eia?, aeey ye?aia ioieou iiaeiaith caiaiytho
ioieou i?aaeuaeouaai iaith, ia/eiay n aa?oiaai aeiea, i?e yoii iie iiaoo
caiaiyoue oieueei /anoue i?aaeuaeouaai iaith. Iiia? caaeaao iiia?
ia/aeueiie no?iee iiaeiaith. Iai?eia?, **MOVE 3 iicaieyao nio?aiyoue a
ye?aiiii iaith aeinooi e ei?iaaiio iaith AaoiEAAea e iauaeoiie
aeeiaie/aneie i?eaycea «* * * *», a aeaeaa ?acianoeoue iiaeiaith aeey
eiiaiaeu «MOVE:».

*oiau aeoeaece?iaaoue eee aeaaeoeaece?iaaoue iaeioi?ia iiaeiaith, a
ioieoa iaith eniieuecoaony neaaeothuay eiino?oeoeey:

$= , aaea

– iaoea iaith. Aeiionoeiu neaaeothuea nie?auaiey:

S – aeey iaith SCREEN;

P1 – P16 – aeey iaith POP io 1 aei 16;

I – aeey iaith ICON;

B1 – B4 – aeey iaith BUTTONS;

T1 – T4 – aeey iaith TABLET1 – TABLET4;

A1 – A4 – aeey iaith AUX1.

– oeacuaaao iaoeo iiaeiaith aac neiaieia «**» eee eiy
?acaeaea iaith, eioi?ia aeieaeii aeoeaece?iaaoueny.

Iai?eia?, a iiaeiaith EDIT aeey aeoeaecaoeee iiaeiaith n eiaiai MOVE
eniieuecoaony eiino?oeoeey $S=MOVE:

**EDIT 3

[MOVE:]^C^C$S=MOVE

I?aaeaea /ai aeoeaece?oaony iiaeiaith, ioieou iaith, aeoeaece?iaaiiua a
oaeouee iiiaio a?aiaie, a ?acaeaea ia?aienuaathony a noae. Aeey oiai,
/oiau ainnoaiiaeoue ioieou i?aaeuaeouaai ye?aia, a ioieoa iaith aeieaeii
auaeaaaoueny «$S=». Iai?eia?, /oiau i?aaeoniio?aoue a oaeouai iaith
ioieo LAST aeey aica?aoa a i?aaeuaeouaa iaith, aeieaeai auoue nicaeai
neaaeothuee ioieo:

[_LAST_]^C^C$S=

Eiaiii oae a iaith, iinoaaeyaiii n nenoaiie AaoiEAAe, inouanoaeyaony
aica?ao a i?aaeuaeouaa iaith. Nio?aiythony aei ainueie aeiaeaiiuo
iiaeiaith. Anee eiee/anoai aeiaeaiiuo iaith aieueoa ainueie, ia?aua
iaith i?iiaaeatho.

Aeoeaecaoeeth iaoaiecia iiaeiaith iiaeii inouanoaeyoue a oiaea
auiieiaiey iaeioi?ie eiiaiaeu aac aa i?a?uaaiey, o.a. aeiioneathony
oaeea iineaaeiaaoaeueiinoe eiiaiae, eae «COLOR $=X $S=LACOLOR»:

[COLOR:]^C^CCOLOR $S=X $S=LACOLOR

**X 3

[_LAST]$S= $S=

[DRAW]^C^C$S=X $S=DR

[EDIT]^C^C$S=X $S=ED

**LACOLOR 3

[COLOR]

red

yellow

green

cyan

blue

magenta

white

I?e yoii ia/eiaaony auiieiaiea eiiaiaeu COLOR, caoai iineaaeiaaoaeueii
aeeth/athony aeiiieieoaeueiua iaith ye?aia X e LACOLOR e nenoaia
iaeeaeaao aaiaea ia?aiao?ia eiiaiaeu COLOR.

Ioieo iaith

Eaaeaeue ioieo iaith iiaeao ninoiyoue ec eiiaiaeu, ia?aiao?a eee
iineaaeiaaoaeueiinoe eiiaiae e ia?aiao?ia. Iau/ii eaaeaeue ioieo iaith
caieiaao iaeio no?ieo oaeea.

A ye?aiiii iaith iiaoo iiyaeoueny oieueei ia?aua ainaiue neiaieia ioieoa
iaith. Iai?eia?, eiiaiaea «SNAP 0.01» ioia?aceony ia aeenieaa a aeaea
«SNAP 0.0». A yoii neo/aa aeey ioieoa iaith iiaeii ii?aaeaeeoue
caaieiaie ioieoa, caeeth/ea aai a eaaae?aoiua neiaee «[ ]». Caaieiaie
ioieoa aeieaeai niaea?aeaoue ia aieaa ainueie neiaieia e ia/eiaoueny n
ia?aie iiceoeee. Caaieiaie ioia?aaeaaony ia aeenieaa a niioaaonoaothuai
ianoa ye?aiiiai iaith. *anoue ioieoa, neaaeothuay iinea caaieiaea,
auaeaaony a aeeaeiaiaii iiea i?e auai?a yoiai ioieoa iaith:

[MYSNAP]SNAP 0.01

I?eia/aiea. I?iaaeu a caaieiaeao ioieoia iaith ia o?aaothony. Iie iiaoo
auoue aeeth/aiu aeey oiai, /oiau naeaeaoue oaee oaeiai/eoaaiui.

Ana iaoee iaith, oi?aaeythuea iia?aoi?u e ia?aiao?u iiaoo aaiaeeoueny ia
aa?oiai, ieaeiai ?aaeno?ao eee aea a i?iecaieueiii eo ni/aoaiee. I?e
n/eouaaiee ec oaeea iie i?aia?acothony a neiaieu aa?oiaai ?aaeno?a.

Anee iaeioi?ue ioieo a oaeea iaith ia iiiauaaony a iaeio no?ieo, oi aeey
aai i?iaeieaeaiey eniieuecoaony neiaie «+». Ciae «+» ?aciauaaony a
ea/anoaa iineaaeiaai neiaiea no?iee, eioi?oth au oioeoa i?iaeieaeeoue.

Eiiaaea o?aaoaony aaiae eioi?iaoeee n eeaaeaoo?u eee i?e iiiiue
ono?ienoaa oeacaiey a na?aaeeia ioieoa iaith. Neiaie «\» ii?aaeaeyao
aaiae eioi?iaoeee. Iai?eia?,

[CIRCLE-3]circle \3

[erase 1]erase \;

Caeanue «CIRCLE-3» cai?aoeaaao oi/eo oeaio?a, a caoai n/eouaaao ec iaith
?aaeeon, ?aaiue 3. «ERASE 1» iicaieyao oeacaieai aua?aoue iaeei iauaeo,
neiaie «;» niioaaonoaoao iaaeaoeth .

Aua?aiiue ioieo iaith ia aiciaiiaeyaony:

aei caaa?oaiey auai?a a ?aaeeia iauaeoiie i?eaycee, anee iaeeaeaaony
aaiae oi/ee;

aei caaa?oaiey aaiaea anao eii?aeeiao oi/ee, anee eniieuecothony
eii?aeeiaoiua oeeueo?u;

aei oi?ie?iaaiey anaai iaai?a a eiiaiaea SELECT (aua?aoue);

i?e aaiaea i?ic?a/iie eiiaiaeu aei aa auiieiaiey e caaa?oaiey aaiaea;

anee a ea/anoaa ioaaoa oeacuaaaony ae?oaie ioieo iaith (aeey auai?a
eeth/a eee auiieiaiey i?ic?a/iie eiiaiaeu), aei auiieiaiey yoiai ioieoa
(a naith i/a?aaeue, iiaue aua?aiiue ioieo iiaeao eiaoue naie neiaieu
ia?aoiie einie /a?ou).

I?e ?ac?aaioea iaith, eioi?ua eniieuecotho a aa?neyo AaoiEAAea ia ?aciuo
eiino?aiiuo ycueao, noaiaea?oiua eiiaiaeu e eeth/aaua neiaa AaoiEAAea ia
aiaeeeneii ycuea aoaeoo aaoiiaoe/anee ia?aaiaeeoueny a eiiaiaeu e
eeth/aaua neiaa AaoiEAAea iaoeeiiaeueiie aa?nee (iai?eia?, ?onneee),
anee ia?aae eaaeaeie eiiaiaeie eee eeth/aaui neiaii noieo neiaie
iiae/a?eeaaiey (_):

[Oeaio?, Ia/aei, Aeeeia]^C^C_arc;_c;\\_l

Aeey ioiaiu aeaenoaey i?aaeuaeouae eiiaiaeu iiaeii eniieueciaaoue a
ioieoa iaith no?ieo ^C^C. Aa aeaenoaea aiaeiae/ii aeaieiiio aaiaeo
. Oioy auiieiaiea aieueoeinoaa eiiaiae ioiaiyaony iaeiei ^C,
^C^C o?aaoaony aeey aica?aoa e iiaeneacea Command: ec aeiaeaiiie
eiiaiaeu (iai?eia?, DIM); iiyoiio aeey iaaeaaeiinoe ?aeiiaiaeoaony
eniieueciaaoue ^C^C.

Iau/ii neiaieu, n/eoaiiua ec ioieoa iaith, ioia?aaeathony a ciia
iiaeneacie ye?aia, eae i?e aaiaea n eeaaeaoo?u, a cai?inu aunaa/eaathony
aeaaea a oii neo/aa, eiaaea ioieo iaith aeeth/aao ioaaou. Yoio auaiae
iiaeii iiaeaaeoue n iiiiuueth nenoaiiie ia?aiaiiie MENUECHO. Anee
yoi-auaiae ioeeth/ai, oi?aaeythuay iineaaeiaaoaeueiinoue ^P a ioieoa
aeeth/aao aai.

I?e auai?a ioieoa iaith AaoiEAAe aaoiiaoe/anee noaaeo iinea iaai i?iaae.
Eiiaaea yoi iaaeaeaoaeueii. Iiyoiio nouanoaoao aeaa niaeaoaiey: anee a
ioieoa iaith iiyaeyaony neiaie «;», oi nenoaia AaoiEAAe caiaiyao aai ia
«ENTER». Anee no?iea caeai/eaaaony eaeei-eeai oi?aaeythuei neiaieii «\»,
«;» eee «+», oi AaoiEAAe ia aeiaaaeyao iinea iaai neiaiea i?iaaea.

Iiaeii eniieueciaaoue oi?aaeythuea neiaieu eiaea ASCII a no?iea eiiaiae
a ioieoa iaith iooai aaiaea neiaiea «^» ia?aae ethaui ae?oaei neiaieii.
Iai?eia?, ^N aoaeao i?aia?aciaai a eiae, niioaaonoaothuee /.

A nenoaia i?aaeoniio?aia aiciiaeiinoue aaoiiaoe/aneiai iiaoi?a /anoi
eniieuecoaiuo eiiaiae aei auai?a eaeie-eeai ae?oaie eiiaiaeu. Anee ioieo
iaith ia/eiaaony no?ieie *^C^C (neaaeothuae n?aco ca caaieiaeii ioieoa),
oi ii caiiieiaaony e aoaeao aaoiiaoe/anee aaiaeeoueny a ioaao ia
iiaeneaceo Command: aei oao ii?, iiea ia aoaeao i?a?aai iaaeaoeai
eee auai?ii ae?oaiai ioieoa iaith. ^C iaeuecy eniieueciaaoue
aioo?e ioieoia iaith, ia/eiathueony ni no?iee *^C^C, o.e. i?e yoii
i?a?uaaaony iiaoi? ioieoa iaith.

A oaeeao iaith eniieuecothony neaaeothuea oi?aaeythuea
iineaaeiaaoaeueiinoe neiaieia:

*** – oeacuaaao caaieiaie ?acaeaea;

** – oeacuaaao iaoeo ?acaeaea iiaeiaith;

[] – ia?aie/eaaao caaieiaee aeey ye?aiiiai, iaaeathueo, eo?ni?iiai
iaith, ioieoia iaith, a?aoe/aneeo iaith, eiai neaeaeia eee oaenoa;

; – auaeaao iaaeaoea eeaaeoe ;

^M – auaeaao iaaeaoea eeaaeoe ;

^I – auaeaao iaaeaoea eeaaeoe ;

\ – auaeaao iaoco aeey aaiaea iieueciaaoaeai;

_ – ia?aaiaeeo neaaeothuoth ca iei eiiaiaeo e eeth/aaia neiai AaoiEAAe;

+ – i?iaeieaeaao iae?in ia neaaeothuae no?iea, anee yaeyaony iineaaeiei
neiaieii a no?iea

=* – auaiaeeo oaeouoth ieeoia?aiio, iaaeathuaa eee eo?ni?iia iaith ia
ye?ai;

*^C^C – i?aoeen aeey iiaoi?a ioieoa;

$ – niaoeeaeueiue eiae, eniieuecoaiue aeey oeacaiey AaoiEAAeo caa?oceoue
?acaeae iaith;

^B – ia?aeeth/aao ?aaeei OAA;

^C – ioiaiyao auiieiaiea eiiaiaeu;

^D – ia?aeeth/aao ?aaeei ioia?aaeaiey eii?aeeiao;

^E – onoaiaaeeaaao neaaeothuoth ieineinoue eciiao?ee;

^G – ia?aeeth/aao ?aaeei NAOEA;

^H – auaeaao iaaeaoea eeaaeoe ;

^O – ia?aeeth/aao ?aaeei I?OI;

^P – ia?aeeth/aao ia?aiaiioth MENUECHO;

^Q – ia?aeeth/aao auaiae yoi anao cai?inia, niiauaiee e aaiaeia ia
i?eioa?;

^T – ia?aeeth/aao ?aaeei IEAIOAO;

^V – eciaiyao oaeouee aeaeiaie ye?ai.

Aeey nicaeaiey ioieoia iaith, i?aaeiacia/aiiuo aeey ?aoaiey neiaeiuo
caaea/, iiaeii eniieueciaaoue aiciiaeiinoe neiaieia e S-au?aaeaiee ycuea
AaoiEENI. Iai?eia?, S-au?aaeaiea, iaania/eaathuaa au/a?/eaaiea
i?yiioaieueiie eiiaiie n oeacaieai oi/ae a ea/anoaa aa oaeia:

[BOX](setq a (getpoint «Enter first corner:»));\+

(setq b (getpoint «Enter second corner:»));\+

pline !a (list (car a) (cadr b)) !b (list (car b) (cadr a)) c;

A AaoiEAAea aeiioneaaony eniieueciaaiea aei 255 neiaieia a EENI-eiaea a
oaeeao iaith. A neo/aa aieaa aeeeiiuo eiaeia eo neaaeoao ?acaeaaoue n
iiiiuueth oi/ee n caiyoie (;), /oiau AaoiEAAe iia n/eouaaoue e
eniieueciaaoue eo ioaeaeueiuie aeieaie.

Aeey aieaa oaeiaiiai e yooaeoeaiiai eniieueciaaiey AaoiEENIa a iaith
iiaeii ?acianoeoue EENI-i?ioeaaeo?u a ioaeaeueiuo oaeeao e
eniieueciaaoue oaee aaoiiaoe/aneie caa?ocee n ?anoe?aieai .mnl. Iniiaiui
niaea?aeaieai aeaiiuo oaeeia yaeythony ooieoeee load. AaoiEAAe
aaoiiaoe/anee caa?oaeaao oaee .mnl iinea caa?ocee oaeea iaith n oaeei
aea eiaiai.

Нашли опечатку? Выделите и нажмите CTRL+Enter

Похожие документы
Обсуждение

Оставить комментарий

avatar
  Подписаться  
Уведомление о
Заказать реферат
UkrReferat.com. Всі права захищені. 2000-2019