SPONSORS:






User Tag List

Results 1 to 2 of 2

Thread: Does the

  1. #1
    Guest

    Does the

    I am trying to get values read an INI file and the IniFileGetValue() function is returning NULL. I added some PRINT statments to see if the variables are correct, and it all looks good. This is driving me nuts...

    Here is the function (with the extra PRINT statements)

    [-] string GetIniValue (string sIniFile, string sSection, string sVariable)
    [ ]
    [ ] string rString
    [ ] HINIFILE hIniFile
    [ ] //DEBUG
    [-] if (sVariable == "SETUP")
    [ ] print(sIniFile)
    [ ] print(sSection)
    [ ] print(sVariable)
    [ ] //DEBUG
    [ ]
    [ ] hIniFile = IniFileOpen (sIniFile)
    [ ] rString = IniFileGetValue(hIniFile, sSection, sVariable)
    [ ]
    [-] if (rString == "")
    [ ] rString = null
    [ ]
    [ ] return rString

    The Print statements return the following:
    D:\automation\include\my_menu.inc
    CCB
    SETUP

    (location, section, variable)

    The rString variable always comes back with NULL.

    Any advice for a beginner (sorry, started SILK on Monday).

    David Genrich


  2. #2
    Senior Member
    Join Date
    Dec 2001
    Location
    San Jose, CA
    Posts
    102
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Does the

    Dave,
    More likely is that you have extra space in your string. Use QAP Debugger and step through and look at the local or globle variables.

    MHwee

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:11 AM.

Copyright BetaSoft Inc.