I go this from some mailing list ... dont know if it helps but for what it is
worth ...
In C, a char is a kind of integer, and so there is such a thing as an "unsigned char".
In C, "char" can mean either "unsigned char" or "signed char",
depending on the platform. (Unlike other kinds of integers, which are
always signed by default.) The ANSI standard added the "signed"
keyword so you could talk about signed chars on architectures where the
default char was unsigned.
On Tue, Aug 21, 2001 at 02:53:24PM +0200, Stefan Oswald shaped the electrons to read:
>
> I?ve read the term "signed char" in a script that i want to analyze. I
> checked the cookbook and cpan and i still have no clue, what that could
> mean.
> I also post the sub which includes the comment for better understanding
> ....
> Maybe someone could give me an idea .. .(also about pack and unpack)
> thx in advance
> Stefan
>
> #
> # return status of ....
> #
> sub exitValue {
> my ($status) = @_ ;
> $status = $status >> 8 ; # divide by 256
> $status = unpack('c', pack( 'c', $status)) ; # declare as signed char
> return $status ;
> }
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]