{"id":1487,"date":"2009-02-19T16:30:02","date_gmt":"2009-02-19T13:30:02","guid":{"rendered":"http:\/\/studentpmr.ru\/?p=1487"},"modified":"2009-02-19T16:30:02","modified_gmt":"2009-02-19T13:30:02","slug":"%d1%81%d0%be%d0%b7%d0%b4%d0%b0%d0%bd%d0%b8%d0%b5-%d0%b2%d0%bd%d1%83%d1%82%d1%80%d0%b5%d0%bd%d0%bd%d0%b5%d0%b9-%d0%b1%d0%b0%d0%b7%d1%8b-%d0%b7%d0%bd%d0%b0%d0%bd%d0%b8%d0%b9-%d1%8d%d0%ba%d1%81%d0%bf","status":"publish","type":"post","link":"https:\/\/studentpmr.ru\/?p=1487","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0430 \u041f\u0420\u041e\u041b\u041e\u0413\u0415."},"content":{"rendered":"<p>\u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0412\u0430\u0436\u043d\u044b\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u044f (\u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u0445) \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.\u00a0<!--more--><br \/>\n\/* Program Lab_6_1.PRO *\/<br \/>\ndomains<br \/>\nthing = string<br \/>\nconds = cond*<br \/>\ncond = string<\/p>\n<p>database<br \/>\nis_a(thing,thing,conds)<br \/>\ntype_of(thing,thing,conds)<br \/>\nfalse(cond)<\/p>\n<p>predicates<br \/>\nrun(thing)<br \/>\nask(conds)<\/p>\n<p>clauses<br \/>\nrun(Item):-<br \/>\nis_a(X, Item, List),<br \/>\nask(List),<br \/>\ntype_of(Ans, X, List2),<br \/>\nask(List2),<br \/>\nwrite(&#171;The &#171;, Item,&#187; you need is a\/an &#171;,<br \/>\nAns), nl.<br \/>\nrun(_):-<br \/>\nwrite(&#171;This program does not have enough &#171;),<br \/>\nwrite(&#171;data to draw any conclusions.&#187;),<br \/>\nnl.<br \/>\nask([]).<br \/>\nask([H|T]):-<br \/>\nnot(false(H)),<br \/>\nwrite(&#171;Does this thing help you to &#171;),<br \/>\nwrite(H,&#187; (enter y\/n)&#187;),<br \/>\nreadchar(Ans), nl, Ans=&#8217;y&#8217;,<br \/>\nask(T).<br \/>\nask([H|_]):-<br \/>\nassertz(false(H)), fail.<br \/>\nGoal run(tool).<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u043a\u0442\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u0437\u0430\u043d\u0435\u0441\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u043e\u0432 asserta, \u0438\u043b\u0438 assertz, \u0438\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u043d\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 consult. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u043d\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 clauses.<br \/>\nis_a(language, tool, [&#171;communicate&#187;]).<br \/>\nis_a(hammer, tool, [&#171;build a house&#187;, &#171;fix a fender&#187;, &#171;crack a nute&#187;]).<br \/>\nis_a(sewing_machine, tool, [&#171;make clothing&#187;, &#171;repair sails&#187;]).<br \/>\nis_a(plow, tool, [&#171;prepare fields&#187;, &#171;farm&#187;]).<br \/>\ntype_of(english, lahguage, [&#171;communicate with people&#187;]).<br \/>\ntype_of(prolog,lahguage, [&#171;communicate with a computer&#187;]).<\/p>\n<p>\u041e\u0442\u0432\u0435\u0447\u0430\u0439\u0442\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c.<br \/>\n\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b goal:<br \/>\nretract(type_of(prolog, language, [&#171;communicate with a computer&#187;])),<br \/>\nasserta(type_of(&#171;turbo prolog&#187;, language, [&#171;communicate with personal computer&#187;])),<br \/>\nasserta(type_of(prolog, language, [&#171;communicate with a mainframe computer&#187;])),<br \/>\nrun(tool).<\/p>\n<p>\u042d\u0442\u0430 \u0446\u0435\u043b\u044c \u0443\u0434\u0430\u043b\u0438\u0442 \u0444\u0430\u043a\u0442<br \/>\ntype_of(prolog, language, [&#171;communicate with a computer&#187;])<br \/>\n\u0438\u0437 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0444\u0430\u043a\u0442\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443<br \/>\ntype_of(prolog, language, [&#171;communicate with a mainframe computer&#187;]).<br \/>\ntype_of(&#171;turbo prolog&#187;, language, [&#171;communicate with personal computer&#187;]).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043d\u043e\u0432\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u0439\u0442\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0437\u044b\u043a \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c.<br \/>\n\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 save \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430 \u0441 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0435\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 save(&#171;mydata.dba&#187;) \u0444\u0430\u0439\u043b MYDATA.DBA \u0431\u0443\u0434\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u0441\u0435\u043a\u0446\u0438\u0438 clauses \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u041f\u0440\u043e\u043b\u043e\u0433\u0430, \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0435. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 consult \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432 \u043f\u0430\u043c\u044f\u0442\u044c:<br \/>\nconsult(&#171;mydata.dba&#187;)<\/p>\n<p>2. \u041c\u043e\u0436\u043d\u043e \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u043a\u0442\u0430\u043c\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430\u043c\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0444\u0430\u043a\u0442\u0430\u043c\u0438, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 database \u0432\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b) \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0435\u0440\u043c\u0430\u043c\u0438.<br \/>\n\u041f\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u041f\u0440\u043e\u043b\u043e\u0433 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u043c. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435:<br \/>\ndatabase -dba1 \/* dba1 &#8212; \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u043e\u0432 *\/<br \/>\nperson(name, telno)<br \/>\ncity(cno, cname)<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u0442\u0430\u043a\u0438\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u041f\u0440\u043e\u043b\u043e\u0433\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043e\u0431\u043b\u0430\u0442\u044c (\u0434\u043e\u043c\u0435\u043d) dba1: domains<br \/>\ndba1 = person(name, telno); city(cno, cname)<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0434\u043e\u043c\u0435\u043d dba1 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0435 \u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 my_consult, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0443 consult, \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442 readterm (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0433\u043b\u0430\u0432\u0435 12).<br \/>\n\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 Lab_6_2.PRO \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0443\u0442\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u0435\u043c.<br \/>\n\u0424\u043e\u0440\u043c\u0430\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0444\u0430\u043a\u0442\u0430\u0445 field \u0438 textfield, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 screen. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d \u044d\u043a\u0440\u0430\u043d\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 screens. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442 shiftscreen \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0445\u0441\u044f \u044d\u043a\u0440\u0430\u043d\u043e\u0432 \u0432 \u0431\u0430\u0437\u0443 screen, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0432 \u0432\u0441\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0431\u0430\u0437\u0435 \u0438 \u0432\u044b\u0437\u0432\u0430\u0432 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442 screen \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435 \u043c\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043d\u043e\u0432\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u044d\u043a\u0440\u0430\u043d\u0430 \u0432 \u0431\u0430\u0437\u0443 screen.<\/p>\n<p>\/* \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 Lab_6_2.PRO *\/<br \/>\ndomains<br \/>\nscreen_name = symbol<br \/>\nfield_name = symbol<br \/>\nrow, col, len = integer<br \/>\ntype = int(); str(); real()<\/p>\n<p>database &#8212; screen<br \/>\nfield(field_name, type, row, col, len)<br \/>\ntextfield(row, col, len, string)<\/p>\n<p>database &#8212; screens<br \/>\nscreen(screen_name, screen)<\/p>\n<p>predicates<br \/>\nshiftscreen(screen_name)<\/p>\n<p>clauses<br \/>\nshiftscreen(Screen):-<br \/>\nretractall(_, screen),<br \/>\nscreen(Screen, ScreenFact),<br \/>\nassert(ScreenFact),<br \/>\nfail.<br \/>\nshiftscreen(_).<\/p>\n<p>\/* \u0421\u0445\u0435\u043c\u0430 \u044d\u043a\u0440\u0430\u043d\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 person *\/<br \/>\nscreen(person,field(&#171;fname&#187;,str,6,16,36)).<br \/>\nscreen(person,field(&#171;lname&#187;,str,8,15,37)).<br \/>\nscreen(person,field(&#171;street&#187;,str,10,12,40)).<br \/>\nscreen(person,field(&#171;zipcode&#187;,str,12,14,7)).<br \/>\nscreen(person,field(&#171;cityname&#187;,str,12,33,19)).<br \/>\nscreen(person,field(&#171;code&#187;,str,15,17,35)).<br \/>\nscreen(person,textfield(15,4,12,&#187;Person Code:&#187;)).<br \/>\nscreen(person,textfield(12,22,10,&#187;City Name:&#187;)).<br \/>\nscreen(person,textfield(12,4,8,&#187;Zip code:&#187;)).<br \/>\nscreen(person,textfield(10,4,7,&#187;Street:&#187;)).<br \/>\nscreen(person,textfield(6,4,11,&#187;First Name:&#187;)).<br \/>\nscreen(person,textfield(8,4,10,&#187;Last Name:&#187;)).<\/p>\n<p>\/* \u0421\u0445\u0435\u043c\u0430 \u044d\u043a\u0440\u0430\u043d\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 city *\/<br \/>\nscreen(city,field(&#171;zipcode&#187;,str,8,16,7)).<\/p>\n<p>\u0420\u0435\u0437\u044e\u043c\u0435:<br \/>\n1.\t\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0431\u0430\u0437\u0430 \u041f\u0440\u043e\u043b\u043e\u0433\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0444\u0430\u043a\u0442\u043e\u0432 \u0432\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 database. \u041f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u044b, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u044d\u0442\u0438\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u0444\u0430\u043a\u0442\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 database.<br \/>\n2.\t\u0421\u0435\u043a\u0446\u0438\u044f\u043c database \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u0430 (\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0434\u043e\u043c\u0435\u043d). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043e\u043c\u0435\u043d\u043e\u043c \u0434\u043b\u044f \u043d\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 database \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u043c\u0435\u043d bdasedom. \u0412 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0446\u0438\u0439 database, \u043d\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f. \u0417\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 database.<br \/>\n3.\t\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u043e\u0432 asserta, assertz, \u0438 consult \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0444\u0430\u043a\u0442\u044b \u043a \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u043e\u0432 retract \u0438 retractall \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u044d\u0442\u0438 \u0444\u0430\u043a\u0442\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<br \/>\n4.\t\u041f\u0440\u0435\u0434\u0438\u043a\u0430\u0442 save \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0444\u0430\u043a\u0442\u044b \u0438\u0437 \u0441\u0435\u043a\u0446\u0438\u0438 database \u0432 \u0444\u0430\u0439\u043b\u0435 (\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435). \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u0444\u0430\u043a\u0442\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0444\u0430\u043a\u0442\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 consult.<br \/>\n5.\t\u041c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u043a \u0438 \u043a\u043e \u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430\u043c.<br \/>\n6.\t\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0435\u043a\u0446\u0438\u0438 database, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0444\u0430\u043a\u0442\u0430\u043c\u0438, \u043a\u0430\u043a \u0441 \u0442\u0435\u0440\u043c\u0430\u043c\u0438.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0412\u0430\u0436\u043d\u044b\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u044f (\u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u0445) \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.\u00a0<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"_links":{"self":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/1487"}],"collection":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1487"}],"version-history":[{"count":1,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/1487\/revisions"}],"predecessor-version":[{"id":1488,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/1487\/revisions\/1488"}],"wp:attachment":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}