standard.C.casts.int8

int8 is available since version 1.0.

Prototype:

number int8(number)

Description:

Gets the 8 bits signed integer value of a number.

Return value:

Returns the 8 bits signed integer value of a number.

Example
import standard.C.casts

class Main {
     function Main() {
          var decimal_number=-12.345;
          var a_number=0x10A;

          echo "The eight bit representation of " + decimal_number + " is ";
          echo int8(decimal_number);
          echo "\n";

          echo "The eight bit representation of " + a_number + " is ";
          echo int8(a_number);
          echo "\n";
          
     }
}
 

Results 
The eight bit representation of -12.345000000000001 is -12
The eight bit representation of 266 is 10