Changeset 4493
- Timestamp:
- 10/07/08 04:19:46 (7 weeks ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
library/character.lgt (modified) (3 diffs)
-
library/characterp.lgt (modified) (4 diffs)
-
RELEASE_NOTES.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/library/character.lgt
r4492 r4493 9 9 date is 2008/10/7, 10 10 comment is 'Character predicates.']). 11 12 is_ascii(Char) :- 13 char_code(Char, Code), 14 Code >= 0, 15 Code =< 127. 11 16 12 17 is_alpha('_'). … … 64 69 is_vowel('U'). 65 70 71 is_white_space(' '). 72 is_white_space('\t'). 73 66 74 is_layout(' '). 67 75 is_layout('\t'). 76 is_layout('\f'). 77 is_layout('\r'). 68 78 is_layout('\n'). 79 is_layout('\v'). 69 80 70 81 is_quote(''''). … … 78 89 is_punctation('?'). 79 90 is_punctation('!'). 91 92 is_period('.'). 93 is_period('?'). 94 is_period('!'). 95 96 parenthesis('(', ')'). 97 parenthesis('[', ']'). 98 parenthesis('{', '}'). 80 99 81 100 lower_upper(a, 'A'). -
trunk/library/characterp.lgt
r4492 r4493 7 7 date is 2008/10/7, 8 8 comment is 'Character protocol.']). 9 10 :- public(is_ascii/1). 11 :- mode(is_ascii(+char), zero_or_one). 12 :- info(is_ascii/1, [ 13 comment is 'True if the argument is an ASCII character.', 14 argnames is ['Char']]). 9 15 10 16 :- public(is_alphanumeric/1). … … 68 74 argnames is ['Char']]). 69 75 76 :- public(is_white_space/1). 77 :- mode(is_white_space(+char), zero_or_one). 78 :- info(is_white_space/1, [ 79 comment is 'True if the argument is a white space character (a space or a tab) inside a line of characters.', 80 argnames is ['Char']]). 81 70 82 :- public(is_layout/1). 71 83 :- mode(is_layout(+char), zero_or_one). … … 83 95 :- mode(is_punctation(+char), zero_or_one). 84 96 :- info(is_punctation/1, [ 85 comment is 'True if the argument is a punctation character.',97 comment is 'True if the argument is a sentence punctation character.', 86 98 argnames is ['Char']]). 99 100 :- public(is_period/1). 101 :- mode(is_period(+char), zero_or_one). 102 :- info(is_period/1, [ 103 comment is 'True if the argument is a character that ends a sentence.', 104 argnames is ['Char']]). 105 106 :- public(parenthesis/2). 107 :- mode(parenthesis(?char, ?char), zero_or_more). 108 :- mode(parenthesis(+char, ?char), zero_or_one). 109 :- mode(parenthesis(?char, +char), zero_or_one). 110 :- info(parenthesis/2, [ 111 comment is 'Recognises and converts between open and close parenthesis.', 112 argnames is ['Char1', 'Char2']]). 87 113 88 114 :- public(lower_upper/2). … … 91 117 :- mode(lower_upper(?char, +char), zero_or_one). 92 118 :- info(lower_upper/2, [ 93 comment is ' Converts between lower and upper case letters.',119 comment is 'Recognises and converts between lower and upper case letters.', 94 120 argnames is ['Char1', 'Char2']]). 95 121 -
trunk/RELEASE_NOTES.txt
r4492 r4493 56 56 Added predicates plus/3 and succ/2 to the library object "integer". 57 57 58 Added predicates is_quote/1 and is_punctation/1 to the library entities 59 "characterp" and "character". 58 Added predicates is_ascii/1, is_white_space/1, is_quote/1, is_period/1, 59 is_punctation/1, and parenthesis/2 to the library entities "characterp" 60 and "character". 60 61 61 62 Modified the implementation of the predicate product/2 in the library
