Core Function isVarShort

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> isVarShort( $variable ) </pre> === Description === Checks if a variable is a signed 16-bit integer type. === Parameters === ==== variable ==== The variable to check. ...")
 
(Remarks)
 
(One intermediate revision by one user not shown)
Line 21: Line 21:
 
=== Remarks ===
 
=== Remarks ===
  
None.
+
Short is an Alias for Int16.
  
 
=== Example ===
 
=== Example ===
  
 
<syntaxhighlight lang="sputnik">
 
<syntaxhighlight lang="sputnik">
$var1 = "check me";
+
$var1 = (short)100;
 
println( "Is it?: " . isVarShort($var1) );
 
println( "Is it?: " . isVarShort($var1) );
 +
// Alternative
 +
println( $var1 is Int16  );
 +
// Alternative
 +
println( $var1 ~~ Int16  );
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
[[Category:Core Function]]
 
[[Category:Core Function]]

Latest revision as of 14:23, 21 August 2013

isVarShort( $variable )

Contents

Description

Checks if a variable is a signed 16-bit integer type.

Parameters

variable

The variable to check.

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

Short is an Alias for Int16.

Example

$var1 = (short)100;
println( "Is it?: " . isVarShort($var1) );
// Alternative
println( $var1 is Int16  );
// Alternative
println( $var1 ~~ Int16  );
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox