Difference between revisions of "VAL()"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
=VAL()=
 
 
 
 
==Class==
 
==Class==
 
Expressions and Type Conversion
 
Expressions and Type Conversion
Line 15: Line 12:
  
 
==See Also==
 
==See Also==
[[SET FIXED]], [[SET DECIMAL]], [[INT()]], [[STR()]], [[TRANSFORM()]], [[ROUND()]]
+
[[INT()]], [[ROUND()]], [[SET DECIMALS]], [[SET FIXED]], [[STR()]], [[TRANSFORM()]]
  
  

Revision as of 12:31, 24 March 2009

Class

Expressions and Type Conversion


Purpose

Function to perform character string to numeric conversion


Syntax

VAL(<expC>)


See Also

INT(), ROUND(), SET DECIMALS, SET FIXED, STR(), TRANSFORM()


Description

The VAL() function converts the character expression <expC> into a numeric value. If SET FIXED is on, then the value of the string will be rounded to the nearest decimal place according to the SET DECIMALS command.


Example

string = "1234"
? val(string)
      1234
set decimals to 2
set fixed on
? val("678.7615")
    678.76


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer