「Write-line」の版間の差分

提供:GizmoLabs - だいたい CAD LISP なサイト
編集の要約なし
編集の要約なし
1行目: 1行目:
{{AutoLISP}}
; 構文
; 構文
: (write-line ''string'' [''file-desc''])
: (write-line ''string'' [''file-desc''])
5行目: 6行目:
; 機能
; 機能
: スクリーンまたは開いているファイルに文字列を書き出す。
: スクリーンまたは開いているファイルに文字列を書き出す。


; 引数
; 引数
:* string : 文字列。
:* string : 文字列。
:* file-desc : 開いているファイルのファイルディスクリプタ。
:* file-desc : 開いているファイルのファイルディスクリプタ。


; 戻り値
; 戻り値
25行目: 28行目:
nil
nil
</pre>
</pre>
-----
* 関連事項
* [[read-line]]
* [[write-line]]


[[Category:AutoLISP]]
[[Category:AutoLISP]]

2015年9月26日 (土) 09:35時点における版

構文
(write-line string [file-desc])


機能
スクリーンまたは開いているファイルに文字列を書き出す。


引数
  • string : 文字列。
  • file-desc : 開いているファイルのファイルディスクリプタ。


戻り値
クォーテーションで囲まれた標準形式の string。ファイルに書き出される場合、クォーテーションは出力されない。
サンプル
 ; 新しいファイルを開く。
(setq f (open "c:¥¥my documents¥¥new.tst" "w")) 
#<file "c:¥¥my documents¥¥new.tst">
; write-line 関数を使用して、ファイルに 1 行書き出す。
(write-line "To boldly go where nomad has gone before." f) 
"To boldly go where nomad has gone before."
; 文字列は、ファイルを閉じるまでは、物理的に書き出されない。
(close f) 
nil