Core Function isVarByte
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> sVarByte( $variable ) </pre> === Description === Checks if a variable is a unsigned 8-bit integer type. === Parameters === ==== variable ==== The variable to check. =...") |
|||
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
<pre> | <pre> | ||
− | + | isVarByte( $variable ) | |
</pre> | </pre> | ||
Line 15: | Line 15: | ||
=== Return Value === | === Return Value === | ||
− | Success: Returns | + | Success: Returns true. |
− | Failure: Returns | + | Failure: Returns false. |
=== Remarks === | === Remarks === | ||
Line 26: | Line 26: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
− | $var1 = | + | $var1 = (byte)100; |
− | println( "Is it?: " . | + | println( "Is it?: " . isVarByte($var1) ); |
+ | // Alternative | ||
+ | println( $var1 is Byte ); | ||
+ | // Alternative | ||
+ | println( $var1 ~~ Byte ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Latest revision as of 14:20, 21 August 2013
isVarByte( $variable )
Contents |
Description
Checks if a variable is a unsigned 8-bit integer type.
Parameters
variable
The variable to check.
Return Value
Success: Returns true.
Failure: Returns false.
Remarks
None.
Example
$var1 = (byte)100; println( "Is it?: " . isVarByte($var1) ); // Alternative println( $var1 is Byte ); // Alternative println( $var1 ~~ Byte );