Changeset 733 for to-imperative/trunk/runtime/rf_word.ih
- Timestamp:
- May 17, 2003, 12:00:10 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
to-imperative/trunk/runtime/rf_word.ih
r731 r733 94 94 Header* h = static_cast<Header*>(ptr_data2); 95 95 96 if ((h->content[i]) == '-') res = -1; //если отрицательное число97 if ((h->content[i]) == '+') res = 1; //если положительное с "+" число96 if ((h->content[i]) == '-') res = -1; 97 if ((h->content[i]) == '+') res = 1; 98 98 if (res) i = 1; 99 99 for (; i < h->length; i++) … … 103 103 return res; 104 104 } 105 106 //the method is called only if is_number() function 107 //has returned non-zero value 108 // 109 110 inline Word::NumIterator::NumIterator(Word const& _word) { 111 Header* h = static_cast<Header*>(_word.ptr_data2); 112 if (*(h->content) == '+' || *(h->content) == '-') 113 iter = h->content + 1; 114 else 115 iter = h->content; 116 bound = h->content + h->length; 117 } 118 119 inline Word::NumIterator& Word::NumIterator::operator ++() { 120 iter++; 121 return *this; 122 }; 123 124 inline Word::NumIterator const& Word::NumIterator::operator = (Word const& _word) { 125 Header* h = static_cast<Header*>(_word.ptr_data2); 126 if (*(h->content) == '+' || *(h->content) == '-') 127 iter = h->content + 1; 128 else 129 iter = h->content; 130 return *this; 131 }; 132 133 inline bool Word::NumIterator::in_bounds () { 134 if (iter > bound ) return false; 135 else return true; 136 } 137 138 inline const wchar_t Word::NumIterator::operator * () { 139 return *iter; 140 } 141 105 142 #if 0 106 143 Expr Word::create_expr (wchar_t const* _wstr)
Note: See TracChangeset
for help on using the changeset viewer.