| 388 | | ur_throwErr( ur_thread, UR_EX_DATATYPE, |
| 389 | | "Invalid type for 'maximum" ); |
| 390 | | break; |
| 391 | | } |
| | 388 | ur_throwErr( UR_ERR_DATATYPE, "Invalid type for 'maximum" ); |
| | 389 | break; |
| | 390 | } |
| | 391 | } |
| | 392 | |
| | 393 | |
| | 394 | // (int shift-count -- int) |
| | 395 | UR_CALL( uc_lshift ) |
| | 396 | { |
| | 397 | UCell* res = ur_s_prev(tos); |
| | 398 | if( ur_is(res, UT_INT) && ur_is(tos, UT_INT) ) |
| | 399 | { |
| | 400 | UR_S_DROP; |
| | 401 | ur_int(res) <<= ur_int(tos); |
| | 402 | return; |
| | 403 | } |
| | 404 | ur_throwErr( UR_ERR_DATATYPE, "Bit shift expected int! int!" ); |
| | 405 | } |
| | 406 | |
| | 407 | |
| | 408 | // (int shift-count -- int) |
| | 409 | UR_CALL( uc_rshift ) |
| | 410 | { |
| | 411 | UCell* res = ur_s_prev(tos); |
| | 412 | if( ur_is(res, UT_INT) && ur_is(tos, UT_INT) ) |
| | 413 | { |
| | 414 | UR_S_DROP; |
| | 415 | ur_int(res) >>= ur_int(tos); |
| | 416 | return; |
| | 417 | } |
| | 418 | ur_throwErr( UR_ERR_DATATYPE, "Bit shift expected int! int!" ); |