The Iso Char module
Author(s): The CLIP Group, Daniel Cabeza, Edison Mera (documentation), Manuel Hermenegildo (minor mods).
This module provides some basic predicates according to the ISO specification of char manipulation.
Usage and interface
- Library usage:
:- use_module(library(iso_char)). - Exports:
- Predicates:
char_code/2, atom_chars/2, number_chars/2, char_codes/2, get_char/1, get_char/2, peek_char/1, peek_char/2, put_char/1, put_char/2.
- Predicates:
- Imports:
- Packages:
prelude, nonpure, condcomp, assertions, isomodes.
- Packages:
Documentation on exports
Succeeds iff the character code of the one char atom Char is Code.
Usage 1:ISO
- Call and exit should be compatible with:
(basic_props:character_code/1)Code is an integer which is a character code. - The following properties should hold at call time:
(basic_props:atm/1)Char is an atom. - The following properties should hold upon exit:
(basic_props:character_code/1)Code is an integer which is a character code.
Usage 2:ISO
- The following properties should hold at call time:
(term_typing:var/1)Char is a free variable.
(basic_props:character_code/1)Code is an integer which is a character code. - The following properties should hold upon exit:
(basic_props:atm/1)Char is an atom.
Succeeds iff Chars is a list whose elements are the one-char atoms whose names are the successive characters of the name of atom Atom
Usage 1:ISO
- Call and exit should be compatible with:
(basic_props:list/2)Chars is a list of atms. - The following properties should hold at call time:
(basic_props:atm/1)Atom is an atom. - The following properties should hold upon exit:
(basic_props:list/2)Chars is a list of atms.
Usage 2:ISO
- The following properties should hold at call time:
(term_typing:var/1)Atom is a free variable.
(basic_props:list/2)Chars is a list of atms. - The following properties should hold upon exit:
(basic_props:atm/1)Atom is an atom.
Success iff Chars is a list whose elements are the one-char atoms corresponding to a character sequence of Number which could be output
Usage 1:ISO
- Call and exit should be compatible with:
(basic_props:list/2)Chars is a list of atms. - The following properties should hold at call time:
(basic_props:num/1)Number is a number. - The following properties should hold upon exit:
(basic_props:list/2)Chars is a list of atms.
Usage 2:ISO
- The following properties should hold at call time:
(term_typing:var/1)Number is a free variable.
(basic_props:list/2)Chars is a list of atms. - The following properties should hold upon exit:
(basic_props:num/1)Number is a number.
Usage 1:
- Call and exit should be compatible with:
(basic_props:list/2)Arg2 is a list of character_codes. - The following properties should hold at call time:
(basic_props:list/2)Arg1 is a list of atms. - The following properties should hold upon exit:
(basic_props:list/2)Arg2 is a list of character_codes.
Usage 2:
- The following properties should hold at call time:
(term_typing:var/1)Arg1 is a free variable.
(basic_props:list/2)Arg2 is a list of character_codes. - The following properties should hold upon exit:
(basic_props:list/2)Arg1 is a list of atms.
Is true iif Char unifies with the next character to be input from the target Stream.
Usage:ISO
- Call and exit should be compatible with:
(basic_props:atm/1)Char is an atom. - The following properties should hold at call time:
(streams_basic:stream/1)Stream is an open stream. - The following properties should hold upon exit:
(streams_basic:stream/1)Stream is an open stream.
(basic_props:atm/1)Char is an atom. - The following properties should hold globally:
(basic_props:not_further_inst/2)Stream is not further instantiated.
Usage:ISO
Similar to peek_code/1, but using char instead of code.
- Call and exit should be compatible with:
(basic_props:atm/1)Arg1 is an atom. - The following properties should hold upon exit:
(basic_props:atm/1)Arg1 is an atom.
Usage:ISO
Similar to peek_code/2, but using char instead of code.
- Call and exit should be compatible with:
(basic_props:atm/1)Arg2 is an atom. - The following properties should hold at call time:
(streams_basic:stream/1)Arg1 is an open stream. - The following properties should hold upon exit:
(streams_basic:stream/1)Arg1 is an open stream.
(basic_props:atm/1)Arg2 is an atom. - The following properties should hold globally:
(basic_props:not_further_inst/2)Arg1 is not further instantiated.
Usage:ISO
Similar to put_code/1, but using char instead of code.
- The following properties should hold at call time:
(basic_props:atm/1)Arg1 is an atom.
Usage:ISO
Similar to put_code/2, but using char instead of code.
- The following properties should hold at call time:
(streams_basic:stream/1)Arg1 is an open stream.
(basic_props:atm/1)Arg2 is an atom. - The following properties should hold upon exit:
(streams_basic:stream/1)Arg1 is an open stream. - The following properties should hold globally:
(basic_props:not_further_inst/2)Arg1 is not further instantiated.