Next: コマンドライン, Previous: MaybeとEither、オプショナルなコンテナ型, Up: ライブラリモジュール - SRFI [Contents][Index]
srfi-192
- ポート位置This srfi defines procedures to get and set the current position of the port.
This feature is already supported in the Gauche core, so the following procedure is described in ポート共通の操作.
port-position port-has-port-position? set-port-position! port-has-set-port-position?
[SRFI-192]
{srfi-192}
This portably creates a condition suitable to be raised from
set-port-position!
when the given position object can’t
be accepted. The pos argument is the offending position object.
In Gauche, such condition is represented by
<io-invalid-position-error>
class, which is a subclass
of <port-error>
.
If you raise a condition created with this procedure from
the set-position!
callback of the custom ports
(see カスタムポート), Gauche intercepts it and adds
the port information to the condition.
[SRFI-192]
{srfi-192}
Returns #t
iff obj is an i/o-invalid-position-error
condition (or a compound condition that includes it).
In Gauche, it is the same as
(condition-has-type? obj <io-invalid-position-error>)
.
Next: コマンドライン, Previous: MaybeとEither、オプショナルなコンテナ型, Up: ライブラリモジュール - SRFI [Contents][Index]