Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Integer Built-in Functions

These built-in functions are accessed via the pseudo unit “Integer”

Integer:fromString

Returns an integer representation of the string value expression

 

  1. @Test
  2. void testFromString(){
  3.     string s = "12";
  4.     int value = Integer:fromString(s);
  5.     Assert:isNotNull(value, "Integer:fromString returned null for a valid integer value");
  6.     Assert:isEqual(value, 12, "Integer:fromString returned an incorrect integer value");
  7.  
  8.     s = "abc";
  9.     value = Integer:fromString(s);
  10.     Assert:isNull(value, "Integer:fromString didn't return null for an invalid integer value");
  11. }

 

Decimal Built-in Functions 

These built-in functions are accessed via the pseudo unit “Decimal”

 

Decimal:fromString

Returns an decimal representation of the string value expression

decimal value = Decimal:fromString(s);

 

Uuid Built-in Functions 

These built-in functions are accessed via the pseudo unit “Uuid”

 

Uuid:fromString

Returns an UUID representation of the string value expression
 

 

uuid value = Uuid:fromString(s);

  

 

 

 

 

 

 

 

 

 

  • No labels