sitelogo
atom_codes/2

アトムと1文字アトムのコ−ドのリストの関係を定義する。

atom_codes(+アトム, -リスト)
atom_codes(-アトム, +リスト)

もし、アトムがアトムならば、atom_codes/2 は、アトム を文字コ−ドのリストに変換する。
もし、アトムが変数ならば、リストは、文字コ−ドのリストでなければならない。atom_codes/2 は、文字コ−ドを文字に変換し、これらの文字を連結してアトム アトムを生成する。

引数

アトム                  アトム
リスト                  文字コ−ドのリスト(between 0'\u0000 and 0'\uffff)

atom_codes(abcde, L). L <- [97, 98, 99, 100, 101] の代入で、成功。
atom_codes(A, [108,105,116,117]). A <- list の代入で、成功。
atom_codes(list, [108,I,116,T]). I <- 105, T<- 117 の代入で、成功。

標準

この述語は、ISO-Prolog標準に含まれる。

関連

atom_chars/2, atom_concat/3, atom_length/2, atom_number/2, char_code/2, number_chars/2, number_codes/2, parse_atom/2/3, sub_atom/5.


戻る 続く..
冒頭へ managed with ubiCMS