Contact | Privacy | Datenschutzerklärung | Impressum


Format: integer ( value [,base [, position ] ] )

Purpose: Converts a value to an integer. The value parameter can be of any type except the object type. If the value is of type string and the base parameter is given, then base is taken as the base (e.g. 10 for decimal, 16 for hex numbers) for the value. If base is not given, it defaults to 10. If value is of type 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 an integer. 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 integer value. Returns value if value is an integer. If value is of type real, all digits after the comma are removed. If value is of type Boolean, 0 is returned for a false value and 1 is returned for a true value.


input:resulting output:
<? integer(3.14159)>3
<? integer(-3.14159)>-3
<? integer("3.14159",10,x)> <? x>3 1
<? integer("3",10)>3
<? integer("ff",16)>255
<? integer("ffff",16)>65535

See Also: real().

This page was dynamically generated by the web application development tool RADpage of H.E.I. H.E.I. provides support, tools, and services like Webdesign in Mannheimm, the HTML/CSS 3D WebGL Animation Library taccgl, 3D Webdesign, and 3D Product Configurator (3D Produkt Konfigurator in German).

Selected blog articles : 3D Objects on HTML pages, CSS Transition Visibility, and CSS Transition Display.

© 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