"Sputnik" help  
Sputnik Help
Language Reference - Operators - Operator ~~ (Type Checking)

Operator ~~

Type checking. e.g.

// Used to check if a variable is a certain type
my $a = (int64)1; 
if($a ~~ Int64)
{
    say "\$a is an Int64";
}
else
{
    say "\$a is NOT an Int64";
}
// PRINTSW
// $a is an Int64

// Can be used for classes and other objects too
Class Testy
{
}; 
my $b = new Testy(); 
if($b ~~ Testy)
{
    say "\$a is an instance of class Testy";
}
else
{
    say "\$a is NOT an instance of class Testy";
}
// PRINTS
// $a is an instance of class Testy

To see a list of all the operators go here.


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org