外部変形は データのやり取りをテキストファイルで行うので プログラム言語は 自由に選ぶことができます。図形は機能的かつシンプルなため、数多くのユーザーに受け入れられています。
clispで点と点マーカを円に変換する
:clispで点と点マーカを円に変換する
@echo off
set pt=点を残す
:set pt=点を残さない
for /f "delims=:" %%n in ('findstr /n "^#!" %0') do (
more +%%n %0 | clisp -q > nul
)
goto:eof
REM #jww
REM #h1
REM #g1
REM #bz
REM #e
#!この次の行からプログラムを書いてください
;点を円(半径 10mm)に変換する
(setq pt (ext:getenv "pt"))
( ;jwc_temp.txt へ 出力
with-open-file (g "jwc_temp.bak" :direction :output)
( ;jwc_temp.txt から 入力
with-open-file (f "jwc_temp.txt" :direction :input)
(loop for line = (read-line f nil) while line do
(setq a (regexp:regexp-split "\\s\\+" line))
(cond ( (regexp:match "^pt" line)
(progn
(format g "ci ~a ~a 10~%" (nth 1 a) (nth 2 a))
(if (equal pt "点を残す") (
write-line line g) ;点を残す
))
)
( (regexp:match "^pn" line)
(progn
(format g "lc~a~%" (subseq line 2 (length line)))
(write-line line g)
)
)
( (regexp:match "^hq" line)
(progn
(write-line "hd" g)
(write-line "bz" g)
)
)
(t (write-line line g)
)
)
)
)
)
(delete-file "jwc_temp.txt")
(rename-file "jwc_temp.bak" "jwc_temp.txt")