Deutsch English
Alphabetical index
Array functions
CGI functions
Data types
Date functions
Debugging
Fulltext functions
Language elements
Numerical functions
Operators
Other functions
Ramtext functions
Selecting
Socket functions
Statistical functions
Stream functions
String functions
System functions
  • chdir()
  • chmod()
  • compile()
  • copyfile()
  • delfile()
  • delident()
  • dirinfo()
  • diskfree()
  • DO
  • execprog()
  • firstdir()
  • flush()
  • getdir()
  • getenv()
  • getident()
  • getpara()
  • getsize()
  • halt()
  • isfile()
  • makedir()
  • nextdir()
  • pause()
  • privdir()
  • remdir()
  • rename()
  • setcgilog()
  • setident()
  • setpara()
  • testident()
  • timeout()
  • today()
  • varname()
    Table functions
    Text functions
    Home    Overview    Search    Impressum    Contact    Members
    Topic complex System functions
    Function setident()
    Short Sets a new value in the configuration file
    Syntax SetIdent(IniFile,Identifier,Value : STRING) : INTEGER
    Parameter IniFile : path of the configuration file
    Identifier : "Group.Name" of the new or to alter entry
    Value : any string
    Return error code
    0 = all right
    See also:
    getident() delident() testident()
    Description With this function a new value can set in a configuration file without rewriting the whole file. It is the complement of GetIdent. With this both functions text files of the following form are edited:

     [Group_1]
     Entry1=value_1
     Entry2=value_2
     ...
     [Group_2]
     Entry1=...
     Entry2=...
     ...
    
    Every entry can be composed of 255 chars.
    
    GetIdent(Inifile,'Group_1.Entry_1') returns value_1
    SetIdent(Inifile,'Group_1.Entry_1','New value') results:
    
    [Group_1]
    Entry_1=New value
    Entry_2=value_2
    ...
    

    SetIdent(Inifile,'Group_1.Entry_3','New value') results:
    [Group_1]
    Entry_1=Value_1
    Etnry_2=Value_2
    Entry_3=New value
    

    SetIdent(Inifile,'New_Group.Entry_1','New value')results:
    [Group_1]
    Entry_1=Value_1
    Entry_2=Value_2
    ...
    [Group_2]
    Entry_1=Value_1
    Entry_2=Value_2
    ...
    [New_Group]
    Entry_1=New value
    

    The new set value is valid suddenly, calling GetIdent(....) returns always the most actual value.

    Attention: SetIdent makes no File-Locking but reads the actual status of the file.

    Information: Configuration files are a very comfortable and efficient way for administration of non relational data like system files etc. The access to the single identifier is very fast: An ini file is only read when it is first called and every included inforamtion is archived in a very fast (tree-) search structure.

    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"}