Deutsch English
Alphabetical index
Array functions
CGI functions
Data types
Date functions
Debugging
Fulltext functions
Language elements
Numerical functions
  • abs()
  • arccos()
  • cos()
  • exp()
  • frac()
  • int()
  • log()
  • random()
  • round()
  • sin()
  • sqrt()
  • str()
  • testbit()
  • val()
    Operators
    Other functions
    Ramtext functions
    Selecting
    Socket functions
    Statistical functions
    Stream functions
    String functions
    System functions
    Table functions
    Text functions
    Home    Overview    Search    Impressum    Contact    Members
    Topic complex Numerical functions
    Function str()
    Short Converts a number to a string
    Syntax STR(x : REAL [;s : INTEGER[;n : INTEGER[;t : STRING[;f : STRING[;k : STRING]]]]]] : STRING
    Parameter x : any REAL expression
    s : number of chars with that x is outputted at least (filled up with blanks on the left)
    n : number of decimal places (defaul 0)
    t : char to seperated thousands (default none)
    f : left fill character (instead of blank)
    k : Comma-character (default '.')
    Return Number as string
    See also:
    val() valstr()
    Description Number/String convertion

    STR(x) number as string (rounded to whole number)
    STR(x,s) like previous, but altogether s chars
    STR(x,s,n) like previous, but with n decimal places
    STR(x,s,n,t) like previous and with char t to seperate thousands
    STR(x,s,n,t,f) like previous, but leading blanks are replaced by the fill character f
    STR(x,s,n,t,f,k) like previous, but instead of comma the char k is set.

    Examples:
     STR(123.456)                 "123"
     STR(123.456,10)              "       123"
     STR(123.456,10,2)            "    123,46"
     STR(123456,1,0,'.')          "123.456"
     STR(123456,1,2,'.')          "123.456,00"
     STR(123456,13,2,' ','_','.') "___123 456.00"

    User comments:
    Write a comment:
    Name
    EMail
    Subject
    Text (Switch mode)

    Choose between
    the normal and the
    advanced editor.
    The advanced editor
    runs in IE 5+ and
    Mozilla 1.4+ only
    SPAM-Protection Please enter tdbengine in this field.

    tdbengine chat
    irc.tdbengine.org
    #tdbengine

       Copyright © 2003-2004 tdb Software Service GmbH
       Alle rechte vorbehalten. / All rights reserved
       Last changed: 21.10.2004
    {Fehler für :execmacro{execmacro="sessionspy"}