Core Function isVarServer
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> isVarServer( $variable ) </pre> === Description === Check if a variable holds a Server object from Listen(). === Parameters === ==== variable ==== The variable to chec...") |
|||
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 = SSListen(6745); |
println( "Is it?: " . isVarServer($var1) ); | println( "Is it?: " . isVarServer($var1) ); | ||
+ | // Alternative | ||
+ | println( $var1 is Server ); | ||
+ | // Alternative | ||
+ | println( $var1 ~~ Server ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Latest revision as of 10:49, 29 August 2013
isVarServer( $variable )
Contents |
Description
Check if a variable holds a Server object from Listen().
Parameters
variable
The variable to check.
Return Value
Success: Returns true.
Failure: Returns false.
Remarks
None.
Example
$var1 = SSListen(6745); println( "Is it?: " . isVarServer($var1) ); // Alternative println( $var1 is Server ); // Alternative println( $var1 ~~ Server );