sitelogo
getenv, get_home, get_last, move_cursor
MINERVA superseeded IF/Prolog. Please see http://www.ifcomputer.co.jp/MINERVA for details.

We discontinued to sell IF/Prolog Dec 31. 2003. For current customers, we continue to provide professional support for IF/Prolog until Dec 31, 2008.

getenv(+環境変数名,-環境変数値) get_home(-行,-列) get_last(-行,-列) move_cursor(+行_式,+列_式)

getenv/2では、「環境変数名」はアトムでなければならず、「環境変数値」を「環境変数名」に指定されたオペレ−ティングシステムの環境変数の値と単一化します。そのような変数が存在しない場合、この述語は失敗します。

環境変数は、ユ−ザか、ユ−ザのprofileファイル、loginファイルによってセットしエキスポートするか、あるいはオペレーティングシステムのデフォルトとしてあらかじめ設定されています。

get_home/2は、set_home/2で設定された、スクリ−ンのホ−ム位置の座標を返します。

get_last/2は、move_cursor/2で設定されたカ−ソルの最終位置の座標を返します。

move_cursor/2は、カ−ソルをスクリ−ンの指定した位置に設定します。

?- getenv('TERM',Type), getenv('MORE',Option).

Type = vt100 Option = '-c'

yes ?- get_home(A,B).

A = 0 B = 0

yes ?- move_cursor(10,15), get_last(A,B).

A = 10 B = 15

yes ?-

atom_expected シェル変数名がアトムでない integer_expected 行_式か、あるいは 列_式のいずれかが整数でない


Up read on...
scroll to top managed with ubiCMS