「Write-line」の版間の差分
 (ページの作成: ; 構文 : (write-line ''string'' [''file-desc''])   ; 機能 : スクリーンまたは開いているファイルに文字列を書き出す。  ; 引数 :* string : 文字列…)  | 
				細編集の要約なし  | 
				||
| (同じ利用者による、間の4版が非表示) | |||
| 1行目: | 1行目: | ||
{{AutoLISP}}  | |||
; 構文  | ; 構文  | ||
: (write-line ''string'' [''file-desc''])  | : (write-line  ''string''  [''file-desc''])  | ||
; 機能  | ; 機能  | ||
: スクリーンまたは開いているファイルに文字列を書き出す。  | : スクリーンまたは開いているファイルに文字列を書き出す。  | ||
; 引数  | ; 引数  | ||
:* string : 文字列。  | :* string : 文字列。  | ||
:* file-desc : 開いているファイルのファイルディスクリプタ。  | :* file-desc : 開いているファイルのファイルディスクリプタ。  | ||
; 戻り値  | ; 戻り値  | ||
: クォーテーションで囲まれた標準形式の string。ファイルに書き出される場合、クォーテーションは出力されない。  | : クォーテーションで囲まれた標準形式の string。ファイルに書き出される場合、クォーテーションは出力されない。  | ||
; サンプル  | ; サンプル  | ||
: 新しいファイルを開く。  | <pre class="brush:autolisp;">  | ||
 ; 新しいファイルを開く。  | |||
(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  | |||
</pre>  | |||
-----  | |||
* 関連事項  | |||
* [[open]]  | |||
* [[close]]  | |||
* [[read-line]]  | |||
* [[write-line]]  | |||
[[Category:AutoLISP]]  | [[Category:AutoLISP]]  | ||
2016年11月15日 (火) 16:09時点における最新版
- 構文
 - (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
- 関連事項
 - open
 - close
 - read-line
 - write-line