<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Комментарии на: Работа с xml</title>
	<atom:link href="https://autolisp.ru/2013/05/17/xml-working/feed/" rel="self" type="application/rss+xml" />
	<link>https://autolisp.ru/2013/05/17/xml-working/</link>
	<description>LISP для AutoCAD</description>
	<lastBuildDate>Tue, 24 Feb 2026 16:11:05 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0</generator>
	<item>
		<title>От: Кулик Алексей aka kpblc</title>
		<link>https://autolisp.ru/2013/05/17/xml-working/comment-page-1/#comment-105136</link>
		<dc:creator><![CDATA[Кулик Алексей aka kpblc]]></dc:creator>
		<pubDate>Tue, 20 Dec 2022 10:41:49 +0000</pubDate>
		<guid isPermaLink="false">http://autolisp.ru/?p=1103#comment-105136</guid>
		<description><![CDATA[Ну взять любой xlsx или docx, распаковать его, взять оттуда любой xml - и вперед.]]></description>
		<content:encoded><![CDATA[<p>Ну взять любой xlsx или docx, распаковать его, взять оттуда любой xml - и вперед.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Владимир</title>
		<link>https://autolisp.ru/2013/05/17/xml-working/comment-page-1/#comment-105134</link>
		<dc:creator><![CDATA[Владимир]]></dc:creator>
		<pubDate>Tue, 20 Dec 2022 10:09:29 +0000</pubDate>
		<guid isPermaLink="false">http://autolisp.ru/?p=1103#comment-105134</guid>
		<description><![CDATA[Виноват, файл есть, но уж слишком простой..
Хочется тоакой, чтобы проиллюстрировал безграничные возможности программ..
Ну или почти безграничные!]]></description>
		<content:encoded><![CDATA[<p>Виноват, файл есть, но уж слишком простой..<br />
Хочется тоакой, чтобы проиллюстрировал безграничные возможности программ..<br />
Ну или почти безграничные!</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Владимир</title>
		<link>https://autolisp.ru/2013/05/17/xml-working/comment-page-1/#comment-105133</link>
		<dc:creator><![CDATA[Владимир]]></dc:creator>
		<pubDate>Tue, 20 Dec 2022 10:02:14 +0000</pubDate>
		<guid isPermaLink="false">http://autolisp.ru/?p=1103#comment-105133</guid>
		<description><![CDATA[Еще бы файл xml, желательно сложной структуры.]]></description>
		<content:encoded><![CDATA[<p>Еще бы файл xml, желательно сложной структуры.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Кулик Алексей aka kpblc</title>
		<link>https://autolisp.ru/2013/05/17/xml-working/comment-page-1/#comment-87352</link>
		<dc:creator><![CDATA[Кулик Алексей aka kpblc]]></dc:creator>
		<pubDate>Mon, 17 Feb 2020 12:05:19 +0000</pubDate>
		<guid isPermaLink="false">http://autolisp.ru/?p=1103#comment-87352</guid>
		<description><![CDATA[Возможно, забыл.
[cc lang=&quot;cadlisp&quot;]
(defun _kpblc-string-replace-noreg (str old new / base lst pos res)
                                   ;&#124;
*    Функция замены вхождений подстроки на новую. Регистронезависима
*    Параметры вызова:
  str  исходная строка
  old  старая строка
  new  новая строка
*    Позволяет менять аналогичные строки: &quot;str&quot; -&gt; &quot;&#039;_str&#039;&quot;
*    Примеры вызова:
(_kpblc-string-replace-noreg &quot;pik-industry-cad&quot; &quot;PIK-IND&quot; &quot;##&quot;)           ; &quot;##ustry-cad&quot; 
(_kpblc-string-replace-noreg &quot;test string test string string&quot; &quot;TEST&quot; &quot;$&quot;) ; &quot;$ string $ string string&quot;
&#124;;
  (setq pos 1)
  (foreach item (setq base (_kpblc-conv-string-to-list (strcase str) (strcase old))
                      base (mapcar (function (lambda (x) (cons x (strlen x)))) base)
                      ) ;_ end of setq
    (setq res (cons (substr str pos (cdr item)) res)
          pos (+ pos (cdr item) (strlen old))
          ) ;_ end of setq
    ) ;_ end of foreach
  (_kpblc-conv-list-to-string (reverse res) new)
  ) ;_ end of defun
[/cc]
На всякий случай:
[cc lang=&quot;cadlisp&quot;](defun _kpblc-conv-string-to-list (string separator / i)
                                  ;&#124;
*    Функция разбора строки. Возвращает список
*    Параметры вызова:
  string      ; разбираемая строка
  separator   ; символ, используемый в качестве разделителя частей
*    Примеры вызова:
(_kpblc-conv-string-to-list &quot;1;2;3;4;5;6&quot; &quot;;&quot;)  ;-&gt; &#039;(1 2 3 4 5 6)
(_kpblc-conv-string-to-list &quot;1;2&quot; &quot;;&quot;)          ;-&gt; &#039;(1 2)
(_kpblc-conv-string-to-list &quot;1,2&quot; &quot;,&quot;)          ;-&gt; &#039;(1 2)
(_kpblc-conv-string-to-list &quot;1.2&quot; &quot;.&quot;)          ;-&gt; &#039;(1 2)
&#124;;
  (cond ((= string &quot;&quot;) nil)
        ((vl-string-search separator string)
         ((lambda (/ pos res)
            (while (setq pos (vl-string-search separator string))
              (setq res    (cons (substr string 1 pos) res)
                    string (substr string (+ (strlen separator) 1 pos))
                    ) ;_ end of setq
              ) ;_ end of while
            (reverse (cons string res))
            ) ;_ end of lambda
          )
         )
        ((and (not (member separator &#039;(&quot;`&quot; &quot;#&quot; &quot;@&quot; &quot;.&quot; &quot;*&quot; &quot;?&quot; &quot;~&quot; &quot;[&quot; &quot;]&quot; &quot;-&quot; &quot;,&quot;)))
              (wcmatch (strcase string) (strcat &quot;*&quot; (strcase separator) &quot;*&quot;))
              ) ;_ end of and
         ((lambda (/ pos res _str prev)
            (setq pos  1
                  prev 1
                  _str (substr string pos)
                  ) ;_ end of setq
            (while (&lt;= pos (1+ (- (strlen string) (strlen separator))))
              (if (wcmatch (strcase (substr string pos (strlen separator))) (strcase separator))
                (setq res    (cons (substr string 1 (1- pos)) res)
                      string (substr string (+ (strlen separator) pos))
                      pos    0
                      ) ;_ end of setq
                ) ;_ end of if
              (setq pos (1+ pos))
              ) ;_ end of while
            (if (&lt; (strlen string) (strlen separator))
              (setq res (cons string res))
              ) ;_ end of if
            (if (or (not res) (= _str string))
              (setq res (list string))
              (reverse res)
              ) ;_ end of if
            ) ;_ end of lambda
          )
         )
        (t (list string))
        ) ;_ end of cond
  ) ;_ end of defun[/cc]
[cc lang=&quot;cadlisp&quot;](defun _kpblc-conv-list-to-string (lst sep) ;&#124;
*    Преобразование списка в строку
*    Параметры вызова:
  lst  ; обрабатываемй список
  sep  ; разделитель. nil -&gt; &quot; &quot;
&#124;;
  (if (and lst
           (setq lst (mapcar (function _kpblc-conv-value-to-string) lst))
           (setq sep (if sep
                       sep
                       &quot; &quot;
                       ) ;_ end of if
                 ) ;_ end of setq
           ) ;_ end of and
    (strcat (car lst)
            (apply (function strcat) (mapcar (function (lambda (x) (strcat sep x))) (cdr lst)))
            ) ;_ end of strcat
    &quot;&quot;
    ) ;_ end of if
  ) ;_ end of defun

(defun _kpblc-conv-value-to-string (value /) ;&#124;
*    конвертация значения в строку.
&#124;;
  (cond ((= (type value) &#039;str) value)
        ((= (type value) &#039;int) (itoa value))
        ((and (= (type value) &#039;real)
              (equal value (_kpblc-eval-value-round value 1.) 1e-6)
              (equal value (fix value) 1e-6)
              ) ;_ end of and
         (itoa (fix value))
         )
        ((and (= (type value) &#039;real)
              (equal value (_kpblc-eval-value-round value 1.) 1e-6)
              (not (equal value (fix value) 1e-6))
              ) ;_ end of and
         (rtos value 2)
         )
        ((= (type value) &#039;real) (rtos value 2 14))
        ((not value) &quot;&quot;)
        (t (vl-princ-to-string value))
        ) ;_ end of cond
  ) ;_ end of defun

(defun _kpblc-eval-value-round
       (value to) ;&#124;
;; http://forum.dwg.ru/showthread.php?p=301275
*    Выполняет округление числа до указанной точности
*    Примеры вызова:
(_kpblc-eval-value-round 16.365 0.01) ; 16.37
&#124;;
  (if (zerop to)
    value
    (cond ((and value (listp value)) (mapcar (function (lambda (x) (_kpblc-eval-value-round x to))) value))
          (value
           (if (or (= (type to) &#039;int) (equal (fix to) to))
             (* (atoi (rtos (/ (float value) to) 2 0)) to)
             (* (fix (/ (float value) to)) to)
             ) ;_ end of if
           )
          ) ;_ end of cond
    ) ;_ end of if
  ) ;_ end of defun[/cc]
Вроде бы ничего не упустил.]]></description>
		<content:encoded><![CDATA[<p>Возможно, забыл.</p>
<div class="codecolorer-container cadlisp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br /></div></td><td><div class="cadlisp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> _kpblc<span style="color: #66cc66;">-</span>string<span style="color: #66cc66;">-</span>replace<span style="color: #66cc66;">-</span>noreg <span style="color: #66cc66;">&#40;</span>str old new <span style="color: #66cc66;">/</span> base lst pos res<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">;|<br />
* &nbsp; &nbsp;Функция замены вхождений подстроки на новую. Регистронезависима<br />
* &nbsp; &nbsp;Параметры вызова:<br />
&nbsp; str &nbsp;исходная строка<br />
&nbsp; old &nbsp;старая строка<br />
&nbsp; new &nbsp;новая строка<br />
* &nbsp; &nbsp;Позволяет менять аналогичные строки: &quot;str&quot; -&gt; &quot;'_str'&quot;<br />
* &nbsp; &nbsp;Примеры вызова:<br />
(_kpblc-string-replace-noreg &quot;pik-industry-cad&quot; &quot;PIK-IND&quot; &quot;##&quot;) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &quot;##ustry-cad&quot; <br />
(_kpblc-string-replace-noreg &quot;test string test string string&quot; &quot;TEST&quot; &quot;$&quot;) ; &quot;$ string $ string string&quot;<br />
|;</span><br />
&nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> pos <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">foreach</span> item <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> base <span style="color: #66cc66;">&#40;</span>_kpblc<span style="color: #66cc66;">-</span>conv<span style="color: #66cc66;">-</span>string<span style="color: #66cc66;">-</span>to<span style="color: #66cc66;">-</span><span style="color: #b1b100;">list</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strcase</span> str<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strcase</span> old<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; base <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">mapcar</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>x<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> x <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strlen</span> x<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> base<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of setq</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> res <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">substr</span> str pos <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> item<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> res<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pos <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">+</span> pos <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> item<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strlen</span> old<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of setq</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of foreach</span><br />
&nbsp; <span style="color: #66cc66;">&#40;</span>_kpblc<span style="color: #66cc66;">-</span>conv<span style="color: #66cc66;">-</span>list<span style="color: #66cc66;">-</span>to<span style="color: #66cc66;">-</span>string <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">reverse</span> res<span style="color: #66cc66;">&#41;</span> new<span style="color: #66cc66;">&#41;</span><br />
&nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of defun</span></div></td></tr></tbody></table></div>
<p>На всякий случай:</p>
<div class="codecolorer-container cadlisp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br /></div></td><td><div class="cadlisp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> _kpblc<span style="color: #66cc66;">-</span>conv<span style="color: #66cc66;">-</span>string<span style="color: #66cc66;">-</span>to<span style="color: #66cc66;">-</span><span style="color: #b1b100;">list</span> <span style="color: #66cc66;">&#40;</span>string separator <span style="color: #66cc66;">/</span> i<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">;|<br />
* &nbsp; &nbsp;Функция разбора строки. Возвращает список<br />
* &nbsp; &nbsp;Параметры вызова:<br />
&nbsp; string &nbsp; &nbsp; &nbsp;; разбираемая строка<br />
&nbsp; separator &nbsp; ; символ, используемый в качестве разделителя частей<br />
* &nbsp; &nbsp;Примеры вызова:<br />
(_kpblc-conv-string-to-list &quot;1;2;3;4;5;6&quot; &quot;;&quot;) &nbsp;;-&gt; '(1 2 3 4 5 6)<br />
(_kpblc-conv-string-to-list &quot;1;2&quot; &quot;;&quot;) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;-&gt; '(1 2)<br />
(_kpblc-conv-string-to-list &quot;1,2&quot; &quot;,&quot;) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;-&gt; '(1 2)<br />
(_kpblc-conv-string-to-list &quot;1.2&quot; &quot;.&quot;) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;-&gt; '(1 2)<br />
|;</span><br />
&nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cond</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> string <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">nil</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">vl-string-search</span> separator string<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/</span> pos res<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> pos <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">vl-string-search</span> separator string<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> res &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">substr</span> string <span style="color: #cc66cc;">1</span> pos<span style="color: #66cc66;">&#41;</span> res<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">substr</span> string <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">+</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strlen</span> separator<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">1</span> pos<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of setq</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of while</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">reverse</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> string res<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of lambda</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">member</span> separator '<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;`&quot;</span> <span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #ff0000;">&quot;@&quot;</span> <span style="color: #ff0000;">&quot;.&quot;</span> <span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #ff0000;">&quot;?&quot;</span> <span style="color: #ff0000;">&quot;~&quot;</span> <span style="color: #ff0000;">&quot;[&quot;</span> <span style="color: #ff0000;">&quot;]&quot;</span> <span style="color: #ff0000;">&quot;-&quot;</span> <span style="color: #ff0000;">&quot;,&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">wcmatch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strcase</span> string<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strcat</span> <span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strcase</span> separator<span style="color: #66cc66;">&#41;</span> <span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of and</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/</span> pos res _str prev<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> pos &nbsp;<span style="color: #cc66cc;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prev <span style="color: #cc66cc;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _str <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">substr</span> string pos<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of setq</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&lt;=</span> pos <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">+</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">-</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strlen</span> string<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strlen</span> separator<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">wcmatch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strcase</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">substr</span> string pos <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strlen</span> separator<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strcase</span> separator<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> res &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">substr</span> string <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">-</span> pos<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> res<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">substr</span> string <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">+</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strlen</span> separator<span style="color: #66cc66;">&#41;</span> pos<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pos &nbsp; &nbsp;<span style="color: #cc66cc;">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of setq</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> pos <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">+</span> pos<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of while</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&lt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strlen</span> string<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strlen</span> separator<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> res <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> string res<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">or</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> res<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> _str string<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> res <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">list</span> string<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">reverse</span> res<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of lambda</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">t</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">list</span> string<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of cond</span><br />
&nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of defun</span></div></td></tr></tbody></table></div>
<div class="codecolorer-container cadlisp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br /></div></td><td><div class="cadlisp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> _kpblc<span style="color: #66cc66;">-</span>conv<span style="color: #66cc66;">-</span>list<span style="color: #66cc66;">-</span>to<span style="color: #66cc66;">-</span>string <span style="color: #66cc66;">&#40;</span>lst sep<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;|<br />
* &nbsp; &nbsp;Преобразование списка в строку<br />
* &nbsp; &nbsp;Параметры вызова:<br />
&nbsp; lst &nbsp;; обрабатываемй список<br />
&nbsp; sep &nbsp;; разделитель. nil -&gt; &quot; &quot;<br />
|;</span><br />
&nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> lst<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> lst <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">mapcar</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">function</span> _kpblc<span style="color: #66cc66;">-</span>conv<span style="color: #66cc66;">-</span>value<span style="color: #66cc66;">-</span>to<span style="color: #66cc66;">-</span>string<span style="color: #66cc66;">&#41;</span> lst<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> sep <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> sep<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sep<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot; &quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of setq</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of and</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strcat</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> lst<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">apply</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">function</span> <span style="color: #b1b100;">strcat</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">mapcar</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>x<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">strcat</span> sep x<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> lst<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of strcat</span><br />
&nbsp; &nbsp; <span style="color: #ff0000;">&quot;&quot;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of if</span><br />
&nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of defun</span><br />
<br />
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> _kpblc<span style="color: #66cc66;">-</span>conv<span style="color: #66cc66;">-</span>value<span style="color: #66cc66;">-</span>to<span style="color: #66cc66;">-</span>string <span style="color: #66cc66;">&#40;</span>value <span style="color: #66cc66;">/</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;|<br />
* &nbsp; &nbsp;конвертация значения в строку.<br />
|;</span><br />
&nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cond</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">type</span> value<span style="color: #66cc66;">&#41;</span> 'str<span style="color: #66cc66;">&#41;</span> value<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">type</span> value<span style="color: #66cc66;">&#41;</span> 'int<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">itoa</span> value<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">type</span> value<span style="color: #66cc66;">&#41;</span> 'real<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">equal</span> value <span style="color: #66cc66;">&#40;</span>_kpblc<span style="color: #66cc66;">-</span>eval<span style="color: #66cc66;">-</span>value<span style="color: #66cc66;">-</span>round value <span style="color: #cc66cc;">1</span>.<span style="color: #66cc66;">&#41;</span> 1e<span style="color: #66cc66;">-</span>6<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">equal</span> value <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">fix</span> value<span style="color: #66cc66;">&#41;</span> 1e<span style="color: #66cc66;">-</span>6<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of and</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">itoa</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">fix</span> value<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">type</span> value<span style="color: #66cc66;">&#41;</span> 'real<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">equal</span> value <span style="color: #66cc66;">&#40;</span>_kpblc<span style="color: #66cc66;">-</span>eval<span style="color: #66cc66;">-</span>value<span style="color: #66cc66;">-</span>round value <span style="color: #cc66cc;">1</span>.<span style="color: #66cc66;">&#41;</span> 1e<span style="color: #66cc66;">-</span>6<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">equal</span> value <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">fix</span> value<span style="color: #66cc66;">&#41;</span> 1e<span style="color: #66cc66;">-</span>6<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of and</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">rtos</span> value <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">type</span> value<span style="color: #66cc66;">&#41;</span> 'real<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">rtos</span> value <span style="color: #cc66cc;">2</span> <span style="color: #cc66cc;">14</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> value<span style="color: #66cc66;">&#41;</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">t</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">vl-princ-to-string</span> value<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of cond</span><br />
&nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of defun</span><br />
<br />
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> _kpblc<span style="color: #66cc66;">-</span>eval<span style="color: #66cc66;">-</span>value<span style="color: #66cc66;">-</span>round<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span>value to<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;|<br />
;; http://forum.dwg.ru/showthread.php?p=301275<br />
* &nbsp; &nbsp;Выполняет округление числа до указанной точности<br />
* &nbsp; &nbsp;Примеры вызова:<br />
(_kpblc-eval-value-round 16.365 0.01) ; 16.37<br />
|;</span><br />
&nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">zerop</span> to<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; value<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cond</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> value <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">listp</span> value<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">mapcar</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>x<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>_kpblc<span style="color: #66cc66;">-</span>eval<span style="color: #66cc66;">-</span>value<span style="color: #66cc66;">-</span>round x to<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> value<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span>value<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">or</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">type</span> to<span style="color: #66cc66;">&#41;</span> 'int<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">equal</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">fix</span> to<span style="color: #66cc66;">&#41;</span> to<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">atoi</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">rtos</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">float</span> value<span style="color: #66cc66;">&#41;</span> to<span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">2</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> to<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">fix</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">/</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">float</span> value<span style="color: #66cc66;">&#41;</span> to<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> to<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of cond</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of if</span><br />
&nbsp; <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;_ end of defun</span></div></td></tr></tbody></table></div>
<p>Вроде бы ничего не упустил.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Юрий</title>
		<link>https://autolisp.ru/2013/05/17/xml-working/comment-page-1/#comment-87351</link>
		<dc:creator><![CDATA[Юрий]]></dc:creator>
		<pubDate>Mon, 17 Feb 2020 09:41:02 +0000</pubDate>
		<guid isPermaLink="false">http://autolisp.ru/?p=1103#comment-87351</guid>
		<description><![CDATA[При попытке использовать _kpblc-xml-attribute-get-name-and-value выходит ошибка: no function definition: _KPBLC-STRING-REPLACE-NOREG
В вашем lisp файле я так и не нашел определение этой функции. Это ошибка или просто забыли выложить?[cc lang=&quot;lisp&quot;]

[/cc]]]></description>
		<content:encoded><![CDATA[<p>При попытке использовать _kpblc-xml-attribute-get-name-and-value выходит ошибка: no function definition: _KPBLC-STRING-REPLACE-NOREG<br />
В вашем lisp файле я так и не нашел определение этой функции. Это ошибка или просто забыли выложить?</p>
<div class="codecolorer-container lisp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br /></div></td><td><div class="lisp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&nbsp;</div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>От: Михаил</title>
		<link>https://autolisp.ru/2013/05/17/xml-working/comment-page-1/#comment-54346</link>
		<dc:creator><![CDATA[Михаил]]></dc:creator>
		<pubDate>Wed, 17 Dec 2014 09:34:53 +0000</pubDate>
		<guid isPermaLink="false">http://autolisp.ru/?p=1103#comment-54346</guid>
		<description><![CDATA[Спасибо. Понял. Исключу.]]></description>
		<content:encoded><![CDATA[<p>Спасибо. Понял. Исключу.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Кулик Алексей aka kpblc</title>
		<link>https://autolisp.ru/2013/05/17/xml-working/comment-page-1/#comment-54345</link>
		<dc:creator><![CDATA[Кулик Алексей aka kpblc]]></dc:creator>
		<pubDate>Wed, 17 Dec 2014 08:26:35 +0000</pubDate>
		<guid isPermaLink="false">http://autolisp.ru/?p=1103#comment-54345</guid>
		<description><![CDATA[Да ее можно исключить абсолютно безболезненно: фактически в лог-файл пишется информация об ошибке. Основная задача там - определить имя лог-файла. Потом создается для него каталог, проверяется длина файла (анализировать многометровый файл по меньшей мере неинтересно ;)), и выполняется запись. Код точно нужен? Там много функций используется...]]></description>
		<content:encoded><![CDATA[<p>Да ее можно исключить абсолютно безболезненно: фактически в лог-файл пишется информация об ошибке. Основная задача там - определить имя лог-файла. Потом создается для него каталог, проверяется длина файла (анализировать многометровый файл по меньшей мере неинтересно ;)), и выполняется запись. Код точно нужен? Там много функций используется...</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Михаил</title>
		<link>https://autolisp.ru/2013/05/17/xml-working/comment-page-1/#comment-54344</link>
		<dc:creator><![CDATA[Михаил]]></dc:creator>
		<pubDate>Wed, 17 Dec 2014 06:15:53 +0000</pubDate>
		<guid isPermaLink="false">http://autolisp.ru/?p=1103#comment-54344</guid>
		<description><![CDATA[В функции _kpblc-error-print используется функция _kpblc-log, описания которой я что-то никак не найду. Можно опубликовать?
Заранее благодарен.]]></description>
		<content:encoded><![CDATA[<p>В функции _kpblc-error-print используется функция _kpblc-log, описания которой я что-то никак не найду. Можно опубликовать?<br />
Заранее благодарен.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Кулик Алексей aka kpblc</title>
		<link>https://autolisp.ru/2013/05/17/xml-working/comment-page-1/#comment-43098</link>
		<dc:creator><![CDATA[Кулик Алексей aka kpblc]]></dc:creator>
		<pubDate>Sun, 19 May 2013 18:21:51 +0000</pubDate>
		<guid isPermaLink="false">http://autolisp.ru/?p=1103#comment-43098</guid>
		<description><![CDATA[Если надо, могу выложить также &quot;все лиспы в одном&quot; и компилированные версии.]]></description>
		<content:encoded><![CDATA[<p>Если надо, могу выложить также "все лиспы в одном" и компилированные версии.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
