Contact | Privacy | Datenschutzerklärung | Impressum


Format: real ( value [, position ] )

Purpose: Converts value to a real number. The value parameter can be of any type except the object type. If value is a string and the position parameter is given, then position must denote a value to which an integer value can be assigned that is the last position in the value string that has been scanned successfully for a real number. If the string value cannot be converted, 0 is assigned to the position.

Return Values: Returns null if value is null or if value cannot be converted to an real value. Returns value if value is a real number. If value is of type integer, the corresponding real value is returned. If value is of type Boolean, 0.0 is returned for a false value and 1.0 is returned for a true value.


input:resulting output:
<? real("text", x) "Nn"> <? x "Nn">null 0
<? real("3.1415 is PI", x)> <? x>3.141500 6
<? real("42")>42.000000
<? real("6+4")>
<? real(integer("ff",16))>255.000000
<? real(true)>1.000000
<? real(false)>0.000000

See Also: integer().

This page was dynamically generated by the web application development tool RADpage of H.E.I. See "Was ist AJAX? " (in German). In Germany H.E.I. provides Webdesign in Mannheim and Web Programming (Programmierung).
© 1996-2024 H.E.I. All Rights Reserved.

Component Guide
  Language Guide
  Language Ref.
    General Design
    Lexical Structure
    heitml Tags
    heitml Functions
    Advanced Functions
    Database Access
    Global Variables
    Form Fields
    Server Variables
    heitml Syntax
  Component Ref.
  Class Library
  User Components
  New Features
  heitml 1
User Guide
Contact / Impressum