IsNumeric

From Catglobe Wiki
Revision as of 04:53, 22 December 2011 by Cg van (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



isNumeric

Checks if the value of a specific parameter can be converted to a number.

Syntax

isNumeric(expression)

Arguments

expression: Is an expression of any types defined

Return type

bool

Examples

string a = "1";

if (isNumeric(a)) print("The value of a can be converted to a number");

else print("The value of a cannot be converted to a number");

//Result: The value of a can be converted to a number

//------------------------------

string b = "Where do you go?";

if (isNumeric(b)) print("The value of b can be converted to a number");

else print("The value of b cannot be converted to a number");

//Result: The value of b cannot be converted to a number

Availability

Version 4.8