Changes in / [7922158:d34575b]
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/prelude/builtins.c
r7922158 rd34575b 10 10 // Created On : Fri Jul 21 16:21:03 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Nov 21 16:31:39 201913 // Update Count : 10 112 // Last Modified On : Wed Jul 8 22:43:14 2020 13 // Update Count : 105 14 14 // 15 15 … … 95 95 static inline forall( dtype DT ) DT * intptr( uintptr_t addr ) { return (DT *)addr; } 96 96 97 // constructor for 128-bit numbers (all constants are unsigned as +/- are operators) 98 static inline void ?{}( unsigned int128 & this, unsigned long int h, unsigned long int l ) { 99 this = (unsigned int128)h << 64 | (unsigned int128)l; 100 } // ?{} 101 97 102 // exponentiation operator implementation 98 103 -
libcfa/src/concurrency/kernel.cfa
r7922158 rd34575b 10 10 // Created On : Tue Jan 17 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue May 26 22:05:19202013 // Update Count : 5912 // Last Modified On : Thu Jul 9 06:22:54 2020 13 // Update Count : 66 14 14 // 15 15 … … 148 148 //----------------------------------------------------------------------------- 149 149 // Global state 150 thread_local struct KernelThreadData kernelTLS __attribute__ ((tls_model ( "initial-exec" ))) = {150 thread_local struct KernelThreadData kernelTLS __attribute__ ((tls_model ( "initial-exec" ))) @= { 151 151 NULL, // cannot use 0p 152 152 NULL, 153 153 NULL, 154 154 { 1, false, false }, 155 6u //this should be seeded better but due to a bug calling rdtsc doesn't work156 155 }; 157 156 -
libcfa/src/iostream.cfa
r7922158 rd34575b 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 6 08:49:48202013 // Update Count : 106 412 // Last Modified On : Wed Jul 8 22:14:20 2020 13 // Update Count : 1069 14 14 // 15 15 … … 675 675 f.val = val % power; 676 676 if ( cnt == 1 && f.flags.left ) { wd = f.wd; f.wd = maxdig; } // copy f.wd and reset for printing middle chunk 677 // printf( "R val:%#lx(%lu) wd:%u pc:%u base:%c neg:%d pc:%d left:%d nobsdp:%d sign:%d pad0:%d\n", 678 // f.val, f.val, f.wd, f.pc, f.base, f.flags.neg, f.flags.pc, f.flags.left, f.flags.nobsdp, f.flags.sign, f.flags.pad0 ); 677 679 (ostype &)(os | f); 678 680 if ( cnt == 1 ) { … … 715 717 716 718 if ( f.flags.neg ) f.val = -f.val; 719 // printf( "L val:%#lx(%lu) wd:%u pc:%u base:%c neg:%d pc:%d left:%d nobsdp:%d sign:%d pad0:%d\n", 720 // f.val, f.val, f.wd, f.pc, f.base, f.flags.neg, f.flags.pc, f.flags.left, f.flags.nobsdp, f.flags.sign, f.flags.pad0 ); 717 721 (ostype &)(os | f); 718 722 -
src/Parser/ExpressionNode.cc
r7922158 rd34575b 10 10 // Created On : Sat May 16 13:17:07 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Dec 18 21:14:58 201913 // Update Count : 98112 // Last Modified On : Sat Jul 11 16:44:49 2020 13 // Update Count : 1034 14 14 // 15 15 … … 85 85 } // if 86 86 // remove "lL" for these cases because it may not imply long 87 str.erase( posn ); // remove length 87 str.erase( posn ); // remove length suffix and "uU" 88 88 } // lnthSuffix 89 89 … … 108 108 } // valueToType 109 109 110 static void scanbin( string & str, unsigned long long int & v ) { 111 v = 0; 112 size_t last = str.length() - 1; // last subscript of constant 113 for ( unsigned int i = 2;; ) { // ignore prefix 114 if ( str[i] == '1' ) v |= 1; 115 i += 1; 116 if ( i == last - 1 || (str[i] != '0' && str[i] != '1') ) break; 117 v <<= 1; 118 } // for 119 } // scanbin 120 110 121 Expression * build_constantInteger( string & str ) { 111 122 static const BasicType::Kind kind[2][6] = { 112 123 // short (h) must be before char (hh) because shorter type has the longer suffix 113 { BasicType::ShortSignedInt, BasicType::SignedChar, BasicType::SignedInt, BasicType::LongSignedInt, BasicType::LongLongSignedInt, BasicType::SignedInt128, },114 { BasicType::ShortUnsignedInt, BasicType::UnsignedChar, BasicType::UnsignedInt, BasicType::LongUnsignedInt, BasicType::LongLongUnsignedInt, BasicType::UnsignedInt128, },124 { BasicType::ShortSignedInt, BasicType::SignedChar, BasicType::SignedInt, BasicType::LongSignedInt, BasicType::LongLongSignedInt, /* BasicType::SignedInt128 */ BasicType::LongLongSignedInt, }, 125 { BasicType::ShortUnsignedInt, BasicType::UnsignedChar, BasicType::UnsignedInt, BasicType::LongUnsignedInt, BasicType::LongLongUnsignedInt, /* BasicType::UnsignedInt128 */ BasicType::LongLongUnsignedInt, }, 115 126 }; 116 127 … … 120 131 }; // lnthsInt 121 132 122 unsigned long long int v; // converted integral value 123 size_t last = str.length() - 1; // last subscript of constant 124 Expression * ret; 125 //string fred( str ); 133 string str2( "0x0" ); 134 unsigned long long int v, v2 = 0; // converted integral value 135 Expression * ret, * ret2; 126 136 127 137 int type = -1; // 0 => short, 1 => char, 2 => int, 3 => long int, 4 => long long int, 5 => int128 … … 139 149 } // if 140 150 151 string::size_type posn; 152 153 // 'u' can appear before or after length suffix 154 if ( str.find_last_of( "uU" ) != string::npos ) Unsigned = true; 155 156 if ( isdigit( str[str.length() - 1] ) ) { // no suffix ? 157 lnthSuffix( str, type, ltype ); // could have length suffix 158 if ( type == 5 && Unsigned ) str.erase( str.length() - 1 ); // L128 and terminating "uU" ? 159 } else { 160 // At least one digit in integer constant, so safe to backup while looking for suffix. 161 162 posn = str.find_last_of( "pP" ); // pointer value 163 if ( posn != string::npos ) { ltype = 5; str.erase( posn, 1 ); goto FINI; } 164 165 posn = str.find_last_of( "zZ" ); // size_t 166 if ( posn != string::npos ) { Unsigned = true; type = 2; ltype = 4; str.erase( posn, 1 ); goto FINI; } 167 168 posn = str.rfind( "hh" ); // char 169 if ( posn != string::npos ) { type = 1; str.erase( posn, 2 ); goto FINI; } 170 171 posn = str.rfind( "HH" ); // char 172 if ( posn != string::npos ) { type = 1; str.erase( posn, 2 ); goto FINI; } 173 174 posn = str.find_last_of( "hH" ); // short 175 if ( posn != string::npos ) { type = 0; str.erase( posn, 1 ); goto FINI; } 176 177 posn = str.find_last_of( "nN" ); // int (natural number) 178 if ( posn != string::npos ) { type = 2; str.erase( posn, 1 ); goto FINI; } 179 180 if ( str.rfind( "ll" ) != string::npos || str.rfind( "LL" ) != string::npos ) { type = 4; goto FINI; } 181 182 lnthSuffix( str, type, ltype ); // must be after check for "ll" 183 FINI: ; 184 } // if 185 141 186 // Cannot be just "0"/"1"; sscanf stops at the suffix, if any; value goes over the wall => always generate 142 187 143 188 if ( str[0] == '0' ) { // radix character ? 144 189 dec = false; 145 190 if ( checkX( str[1] ) ) { // hex constant ? 146 sscanf( (char *)str.c_str(), "%llx", &v ); 191 if ( type < 5 ) { // not L128 ? 192 sscanf( (char *)str.c_str(), "%llx", &v ); 193 } else { // hex int128 constant 194 unsigned int len = str.length(); 195 if ( len > (2 + 16 + 16) ) SemanticError( yylloc, "128-bit hexadecimal constant to large " + str ); 196 if ( len <= (2 + 16) ) goto FHEX1; // hex digits < 2^64 197 str2 = "0x" + str.substr( len - 16 ); 198 sscanf( (char *)str2.c_str(), "%llx", &v2 ); 199 str = str.substr( 0, len - 16 ); 200 FHEX1: ; 201 sscanf( (char *)str.c_str(), "%llx", &v ); 202 } // if 147 203 //printf( "%llx %llu\n", v, v ); 148 204 } else if ( checkB( str[1] ) ) { // binary constant ? 149 v = 0; // compute value 150 for ( unsigned int i = 2;; ) { // ignore prefix 151 if ( str[i] == '1' ) v |= 1; 152 i += 1; 153 if ( i == last - 1 || (str[i] != '0' && str[i] != '1') ) break; 154 v <<= 1; 155 } // for 205 unsigned int len = str.length(); 206 if ( type == 5 && len > 2 + 64 ) { 207 if ( len > 2 + 64 + 64 ) SemanticError( yylloc, "128-bit binary constant to large " + str ); 208 str2 = "0b" + str.substr( len - 64 ); 209 str = str.substr( 0, len - 64 ); 210 scanbin( str2, v2 ); 211 } // if 212 scanbin( str, v ); 156 213 //printf( "%#llx %llu\n", v, v ); 157 214 } else { // octal constant 158 sscanf( (char *)str.c_str(), "%llo", &v ); 215 if ( type < 5 ) { // not L128 ? 216 sscanf( (char *)str.c_str(), "%llo", &v ); 217 } else { // octal int128 constant 218 unsigned int len = str.length(); 219 char buf[32]; 220 __int128 val = v; 221 222 if ( len > 1 + 43 || (len == 1 + 43 && str[0] > '3') ) SemanticError( yylloc, "128-bit octal constant to large " + str ); 223 if ( len <= 1 + 21 ) { // value < 21 octal digitis 224 sscanf( (char *)str.c_str(), "%llo", &v ); // leave value in octal 225 } else { 226 sscanf( &str[len - 21], "%llo", &v ); 227 val = v; // store bits 228 str[len - 21] ='\0'; // shorten string 229 sscanf( &str[len == 43 ? 1 : 0], "%llo", &v ); 230 val |= (__int128)v << 63; // store bits 231 if ( len == 1 + 43 ) { // most significant 2 bits ? 232 str[2] = '\0'; // shorten string 233 sscanf( &str[1], "%llo", &v ); // process most significant 2 bits 234 val |= (__int128)v << 126; // store bits 235 } // if 236 v = val >> 64; v2 = (uint64_t)val; // replace octal constant with 2 hex constants 237 sprintf( buf, "%#llx", v2 ); 238 str2 = buf; 239 sprintf( buf, "%#llx", v ); 240 str = buf; 241 } // if 242 } // if 159 243 //printf( "%#llo %llu\n", v, v ); 160 244 } // if 161 245 } else { // decimal constant ? 162 sscanf( (char *)str.c_str(), "%llu", &v ); 246 if ( type < 5 ) { // not L128 ? 247 sscanf( (char *)str.c_str(), "%llu", &v ); 248 } else { // decimal int128 constant 249 #define P10_UINT64 10'000'000'000'000'000'000ULL // 19 zeroes 250 unsigned int len = str.length(); 251 char buf[32]; 252 __int128 val = v; 253 254 if ( str.length() == 39 && str > (Unsigned ? "340282366920938463463374607431768211455" : "170141183460469231731687303715884105727") ) 255 SemanticError( yylloc, "128-bit decimal constant to large " + str ); 256 if ( len <= 19 ) { // value < 19 decimal digitis 257 sscanf( (char *)str.c_str(), "%llu", &v ); // leave value in decimal 258 } else { 259 sscanf( &str[len - 19], "%llu", &v ); 260 val = v; // store bits 261 str[len - 19] ='\0'; // shorten string 262 sscanf( &str[len == 39 ? 1 : 0], "%llu", &v ); 263 val += (__int128)v * (__int128)P10_UINT64; // store bits 264 if ( len == 39 ) { // most significant 2 bits ? 265 str[1] = '\0'; // shorten string 266 sscanf( &str[0], "%llu", &v ); // process most significant 2 bits 267 val += (__int128)v * (__int128)P10_UINT64 * (__int128)P10_UINT64; // store bits 268 } // if 269 v = val >> 64; v2 = (uint64_t)val; // replace decimal constant with 2 hex constants 270 sprintf( buf, "%#llx", v2 ); 271 str2 = buf; 272 sprintf( buf, "%#llx", v ); 273 str = buf; 274 } // if 275 } // if 163 276 //printf( "%llu\n", v ); 164 277 } // if 165 278 166 string::size_type posn; 167 168 if ( isdigit( str[last] ) ) { // no suffix ? 169 lnthSuffix( str, type, ltype ); // could have length suffix 170 if ( type == -1 ) { // no suffix 171 valueToType( v, dec, type, Unsigned ); 172 } // if 173 } else { 174 // At least one digit in integer constant, so safe to backup while looking for suffix. 175 176 posn = str.find_last_of( "pP" ); 177 if ( posn != string::npos ) { valueToType( v, dec, type, Unsigned ); ltype = 5; str.erase( posn, 1 ); goto FINI; } 178 179 posn = str.find_last_of( "zZ" ); 180 if ( posn != string::npos ) { Unsigned = true; type = 2; ltype = 4; str.erase( posn, 1 ); goto FINI; } 181 182 // 'u' can appear before or after length suffix 183 if ( str.find_last_of( "uU" ) != string::npos ) Unsigned = true; 184 185 posn = str.rfind( "hh" ); 186 if ( posn != string::npos ) { type = 1; str.erase( posn, 2 ); goto FINI; } 187 188 posn = str.rfind( "HH" ); 189 if ( posn != string::npos ) { type = 1; str.erase( posn, 2 ); goto FINI; } 190 191 posn = str.find_last_of( "hH" ); 192 if ( posn != string::npos ) { type = 0; str.erase( posn, 1 ); goto FINI; } 193 194 posn = str.find_last_of( "nN" ); 195 if ( posn != string::npos ) { type = 2; str.erase( posn, 1 ); goto FINI; } 196 197 if ( str.rfind( "ll" ) != string::npos || str.rfind( "LL" ) != string::npos ) { type = 4; goto FINI; } 198 199 lnthSuffix( str, type, ltype ); // must be after check for "ll" 200 if ( type == -1 ) { // only 'u' suffix ? 201 valueToType( v, dec, type, Unsigned ); 202 } // if 203 FINI: ; 204 } // if 279 if ( type == -1 ) { // no suffix => determine type from value size 280 valueToType( v, dec, type, Unsigned ); 281 } // if 282 /* printf( "%s %llo %s %llo\n", str.c_str(), v, str2.c_str(), v2 ); */ 205 283 206 284 //if ( !( 0 <= type && type <= 6 ) ) { printf( "%s %lu %d %s\n", fred.c_str(), fred.length(), type, str.c_str() ); } … … 214 292 } else if ( ltype != -1 ) { // explicit length ? 215 293 if ( ltype == 6 ) { // int128, (int128)constant 216 ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[Unsigned][type] ), false ); 294 // ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[Unsigned][type] ), false ); 295 ret2 = new ConstantExpr( Constant( new BasicType( noQualifiers, BasicType::LongLongSignedInt ), str2, v2 ) ); 296 ret = build_compoundLiteral( DeclarationNode::newBasicType( DeclarationNode::Int128 )->addType( DeclarationNode::newSignedNess( DeclarationNode::Unsigned ) ), 297 new InitializerNode( (InitializerNode *)(new InitializerNode( new ExpressionNode( v2 == 0 ? ret2 : ret ) ))->set_last( new InitializerNode( new ExpressionNode( v2 == 0 ? ret : ret2 ) ) ), true ) ); 217 298 } else { // explicit length, (length_type)constant 218 299 ret = new CastExpr( ret, new TypeInstType( Type::Qualifiers(), lnthsInt[Unsigned][ltype], false ), false ); -
tests/errors/.expect/completeType.txt
r7922158 rd34575b 132 132 ?=?: pointer to function 133 133 ... with parameters 134 reference to instance of type _10 8_0_T (not function type)135 instance of type _10 8_0_T (not function type)134 reference to instance of type _109_0_T (not function type) 135 instance of type _109_0_T (not function type) 136 136 ... returning 137 _retval__operator_assign: instance of type _10 8_0_T (not function type)137 _retval__operator_assign: instance of type _109_0_T (not function type) 138 138 ... with attributes: 139 139 Attribute with name: unused -
tests/manipulatorsOutput3.cfa
r7922158 rd34575b 1 1 #include <fstream.hfa> 2 2 3 int main() { 3 4 5 6 7 8 9 10 11 12 13 14 4 int128 x = 0xffff, y = 0x2; 5 x <<= 64; 6 x += 0xffff; 7 y <<= 64; 8 y += 0123; 9 y |= 0x8000000000000000; 10 x = -x; 11 sout | x; 12 sout | sign(x); 13 x = -x; 14 sout | sign(x); 15 sout | nl; 15 16 16 17 18 19 20 21 22 17 sout | bin(x); 18 sout | upcase(bin(x)); 19 sout | nobase(bin(x)); 20 sout | wd( 95, upcase(bin(x)) ); 21 sout | wd( 95,90, upcase(bin(x)) ); 22 sout | wd( 25,30, upcase(hex(x)) ); 23 sout | nl; 23 24 24 25 26 27 28 29 30 31 32 33 25 printf( "%#.10o\n", 0123 ); 26 sout | wd( 1,10, oct(0123) ); 27 sout | oct(x); 28 sout | nobase(oct(x)); 29 sout | wd( 45, oct(0123) ); 30 sout | wd( 45,40, oct(0123) ); 31 sout | wd( 40,45, oct(0123) ); 32 sout | wd( 45, oct(x) ); 33 sout | wd( 45,40, oct(x) ); 34 sout | wd( 40,45, oct(x) ); 34 35 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 36 sout | left(wd( 45, oct(0123) )) | 'X'; 37 sout | left(wd( 45, oct(x) )) | 'X'; 38 sout | left(wd( 45, oct(y) )) | 'X'; 39 sout | left(wd( 45,40, oct(0123) )) | 'X'; 40 sout | left(wd( 45,40, oct(x) )) | 'X'; 41 sout | left(wd( 45,40, oct(y) )) | 'X'; 42 sout | left(wd( 40,45, oct(0123) )) | 'X'; 43 sout | left(wd( 40,45, oct(x) )) | 'X'; 44 sout | left(wd( 40,45, oct(y) )) | 'X'; 45 printf( "%#-1.10oX\n", 0123 ); 46 sout | left(wd( 1,10, oct(0123) )) | 'X'; 47 printf( "%#-40.10oX\n", 0123 ); 48 sout | left(wd( 40,10, oct(0123) )) | 'X'; 49 sout | left(wd( 40,10, oct(x) )) | 'X'; 50 sout | left(wd( 40,10, oct(y) )) | 'X'; 51 sout | left(wd( 10,40, oct(0123) )) | 'X'; 52 sout | left(wd( 10,40, oct(x) )) | 'X'; 53 sout | left(wd( 10,40, oct(y) )) | 'X'; 53 54 54 55 56 57 58 59 55 y = 01234567; 56 sout | left(wd( 45, 49, oct(y) )) | 'X'; 57 y = -y; 58 sout | wd(0, oct(y)) | 'Y'; 59 sout | left(wd(0, oct(y))) | 'Y'; 60 sout | nl; 60 61 61 62 63 64 65 66 67 68 69 62 sout | hex(x); 63 sout | upcase(hex(x)); 64 sout | nobase(hex(x)); 65 sout | wd( 45, upcase(hex(x)) ); 66 sout | wd( 45,40, upcase(hex(x)) ); 67 sout | wd( 45,49, upcase(hex(x)) ); 68 sout | left(wd( 45, upcase(hex(x)) )) | 'X'; 69 sout | left(wd( 45,40, upcase(hex(x)) )) | 'X'; 70 sout | left(wd( 45,49, upcase(hex(x)) )) | 'X'; 70 71 71 72 sout | nl; 72 73 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 74 int128 divisor = 0x4b3b4ca85a86c47a; 75 divisor <<= 16; 76 divisor += 0x98a224000000000; 77 78 // base 2 79 sout | "base 2"; 80 sout | bin(divisor); 81 sout | upcase(bin(divisor)); 82 sout | wd(38, upcase(bin(divisor))); 83 sout | wd(40, upcase(bin(divisor))); 84 sout | wd(40, 38, upcase(bin(divisor))); 85 sout | wd(40, 30, upcase(bin(divisor))); 86 sout | pad0(sign(wd(40, 38, upcase(bin(divisor))))); 87 sout | nl; 88 89 // oct 90 sout | "base 8"; 91 sout | upcase(oct(divisor)); 92 sout | wd(38, upcase(oct(divisor))); 93 sout | wd(40, upcase(oct(divisor))); 94 sout | wd(40, 38, upcase(oct(divisor))); 95 sout | wd(40, 30, upcase(oct(divisor))); 96 sout | pad0(sign(wd(40, 38, upcase(oct(divisor))))); 97 sout | nl; 97 98 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 99 // decimal 100 sout | "base 10"; 101 sout | divisor; 102 sout | wd(2, divisor); 103 sout | wd(3, divisor); 104 sout | wd(10, divisor); 105 sout | wd(24, divisor); 106 sout | wd(38, divisor); 107 sout | wd(39, divisor); 108 sout | wd(40, divisor); 109 110 sout | wd(40, 30, divisor); 111 sout | wd(40, 38, divisor); 112 sout | wd(40, 40, divisor); 113 sout | pad0(wd(40, divisor)); 114 sout | pad0(sign(wd(40,divisor))); 115 sout | nl; 116 117 // hex 118 sout | "base 16"; 119 sout | upcase(hex(divisor)); 120 sout | wd(38, upcase(hex(divisor))); 121 sout | wd(40, upcase(hex(divisor))); 122 sout | wd(40, 38, upcase(hex(divisor))); 123 sout | wd(40, 30, upcase(hex(divisor))); 124 sout | pad0(sign(wd(40, 38, upcase(hex(divisor))))); 125 sout | nl; 125 126 126 127 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 128 // extras 129 sout | "extras"; 130 sout | bin(divisor); 131 sout | upcase(bin(divisor)); 132 sout | oct(divisor); 133 sout | hex(divisor); 134 sout | upcase(hex(divisor)); 135 sout | nobase(bin(divisor)) | nobase(oct(divisor)) | nobase(hex(divisor)); 136 sout | sign(divisor); 137 sout | -divisor; 138 sout | sign(-divisor); 139 sout | wd(2, divisor); 140 sout | wd(3,10,divisor); 141 sout | left(wd(40,divisor)) | 'X'; 142 sout | left(sign(wd(40, divisor))) | 'X'; 143 sout | left(sign(wd(0,40, divisor))) | 'X'; 144 printf( "%-+1.40dX\n", 123456789 ); 144 145 145 146 146 int128 i128; 147 unsigned int128 ui128; 147 148 148 149 149 i128 = -10; 150 for ( 25 ) { 150 151 sout | left( sign( wd( 20, i128 ) ) ) | left( wd( 20, hex( i128 ) ) ) | left( wd( 20, oct( i128 ) ) ); 151 152 sout | left( wd( 20, bin( i128 ) ) ); 152 153 i128 += 1; 153 } 154 sout | nl; 154 } 155 sout | nl; 156 i128 = 0x7fffffffffffffff; 157 i128 <<= 64; 158 i128 += 0xfffffffffffffffa; 155 159 156 i128 = 0x7fffffffffffffff; 157 i128 <<= 64; 158 i128 += 0xfffffffffffffffa; 159 160 for ( 20 ) { 160 // for ( 20 ) { 161 volatile int stop = 20; 162 for ( int i = 0; i < stop; i += 1 ) { 161 163 sout | i128; 162 164 sout | left( sign( wd( 45, i128 ) ) ) | left( wd( 45, hex( i128 ) ) ) | left( wd( 45, oct( i128 ) ) ); 163 165 sout | left( wd( 45, bin( i128 ) ) ); 164 166 i128 += 1; 165 166 167 } 168 sout | nl; 167 169 168 169 170 171 172 173 sout | ui128;174 ui128 += 1;175 176 170 ui128 = 0x7fffffffffffffff; 171 ui128 <<= 64; 172 ui128 += 0xfffffffffffffffa; 173 174 for ( 20 ) { 175 sout | ui128; 176 ui128 += 1; 177 } 178 sout | nl; 177 179 178 179 180 181 182 183 sout | ui128;184 ui128 += 1;185 180 ui128 = 0xffffffffffffffff; 181 ui128 <<= 64; 182 ui128 += 0xfffffffffffffffa; 183 184 for ( 20 ) { 185 sout | ui128; 186 ui128 += 1; 187 } 186 188 } 189 190 // Local Variables: // 191 // tab-width: 4 // 192 // compile-command: "cfa -Wall -Wextra amanipulatorsOutput3.cfa" // 193 // End: //
Note: See TracChangeset
for help on using the changeset viewer.