NAME

SPVM::CORE - SPVM Standard Functions

SPVM Standard Functions

FUNCTIONS

print

Print string to stdout.

sub print : void ($string : string);

warn

Print string with file name and line number to stderr. line break is added to end of string.

sub warn : void ($string : string);

INT8_MIN

sub INT8_MIN : byte ()

Wapper of INT8_MIN of C99 cstdint library.

INT8_MAX

INT8_MAX : byte ()

Wapper of INT8_MAX of C99 cstdint library.

INT16_MIN

sub INT16_MIN : short ()

Wapper of INT16_MIN of C99 cstdint library.

INT16_MAX

sub INT16_MAX : short ()

Wapper of INT16_MAX of C99 cstdint library.

INT32_MIN

sub INT32_MIN : int ()

Wapper of INT32_MIN of C99 cstdint library.

INT32_MAX

sub INT32_MAX : int ()

Wapper of INT32_MAX of C99 cstdint library.

INT64_MIN

sub INT64_MIN : long ()

Wapper of INT64_MIN of C99 cstdint library.

INT64_MAX

sub INT64_MAX : long ()

Wapper of INT64_MAX of C99 cstdint library.

FLT_MIN

sub FLT_MIN : float ()

Wapper of FLT_MIN of C99 float library.

FLT_MAX

sub FLT_MAX : float ()

Wapper of FLT_MAX of C99 float library.

DBL_MIN

sub DBL_MIN : double ()

Wapper of DBL_MIN of C99 float library.

DBL_MAX

sub DBL_MAX : double ()

Wapper of DBL_MAX of C99 float library.

copy_str

sub copy_str : string ($string : string)

my $string = "abced";
my $string_copy = copy_str($string);

Copy string.

copy_barray

sub copy_barray : byte[] ($nums : byte[])

my $nums = [(byte)1, 2, 3];
my $nums_copy = copy_barray($nums);

Copy byte array.

copy_sarray

sub copy_sarray : short[] ($nums : short[])

my $nums = [(short)1, 2, 3];
my $nums_copy = copy_sarray($nums);

Copy short array.

copy_iarray

sub copy_iarray : int[] ($nums : int[])

my $nums = [1, 2, 3];
my $nums_copy = copy_iarray($nums);

Copy int array.

copy_larray

sub copy_larray : long[] ($nums : long[])

my $nums = [(long)1, 2, 3];
my $nums_copy = copy_larray($nums);

Copy long array.

copy_farray

sub copy_farray : float[] ($nums : float[])

my $nums = [0.5f, 0.25f, 0.3f];
my $nums_copy = copy_farray($nums);

Copy float array.

copy_darray

sub copy_darray : double[] ($nums : double[])

my $nums = [0.5, 0.25, 0.3];
my $nums_copy = copy_darray($nums);

Copy double array.

copy_oarray

sub copy_oarray : object[] ($objects : object[])

my $objects = [(object)SPVM::Int->new(1), SPVM::Int->new(2), SPVM::Int->new(3)];
my $objects_copy = copy_oarray($objects);

Copy object array.

Array is sharrow copy, not deeply copy.