[EMAIL PROTECTED] (Rhys Weatherley) writes:
>     int x = ...;
>     int y = (short)x;
> 
> The value of x is truncated to 16 bits, and then sign-extended
> to int.  I'm looking for something like the "conv.i2" instruction
> in IL, or "i2s" in JVM.

One concievable way to do that is basically have the hypothetical
CSInt and CSShort PMC classes know and care how many bits they're
supposed to be, and handle overflow internally.

If need an op to do it, you can always provide a custom one. I think.

-- 
fga is frequently given answers... the best are "Date::Calc", "use a hash",
and "yes, it's in CPAN" or Data::Dumper or mySQL or "check your permissions"
or NO Fmh THAT'S WRONG or "You can't. crypt is one-way" or "yes, i'm single"
or "I think that's a faq." or substr! or "use split" or "man perlre" - #perl

Reply via email to