in reply to vec overflow?
If you need a larger OFFSET you can switch to a 64 bit platform.¹
vec EXPR,OFFSET,BITS
Treats the string in EXPR as a bit vector made up of elements
of width BITS, and returns the value of the element specified
by OFFSET as an unsigned integer. ...
Or just split the EXPR into smaller chunks and do basic arithmetics for calculating OFFSET.
Cheers Rolf
( addicted to the Perl Programming Language)
¹) doesn't help, according to BrowserUk
see older discussions and proposed workarounds
this workaround doesn't look efficient, since substr is an lvalue you can use constructs like
vec ( substr( $str, OFFSET_HIGH, 2**31), OFFSET_LOW, BITS ) = NEW
(well if substr allows OFFSETs that big ... can't test!)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: vec overflow?
by BrowserUk (Patriarch) on Jun 25, 2013 at 08:49 UTC | |
by LanX (Saint) on Jun 25, 2013 at 09:46 UTC | |
by BrowserUk (Patriarch) on Jun 25, 2013 at 13:47 UTC | |
by LanX (Saint) on Jun 25, 2013 at 14:04 UTC | |
by BrowserUk (Patriarch) on Jun 25, 2013 at 14:18 UTC | |
|