Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>the sxiniinfo array:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  The SXINIINFO Array:

  The SIx Driver maintains a public array called SXINIINFO which contains
  information on each workarea.  The SXINIINFO array contains 250 base
  elements, one for each workarea.  In each of these workarea elements, one
  or more two-dimensional arrays will be stored.  The first element of each
  of these arrays will contain the name of a section heading as a character
  string.  The second element of each array is a two-dimensional array
  itself.  This array contains the actual information for this heading.  In
  this array, element 1 contains the item name (LValue) while element 2
  contains the value for that item.


  The SXINIINFO array is laid out in the following manner:

     WorkArea   Heading   LValue *   RValue *
     --------   -------   --------   --------
      1-250      1-<n>     1-<n>      1-<n>


     (*) - The LValue/RValue elements only apply to Heading element two,
           which is also an array.  Heading element one is not an array,
           but is a character string containing the name for that heading.


      SXINIINFO[1][1] --> Heading name
                . [2] --> Two-Dim Array containing LValue/RValue data
                .  |
                .  +->[1][1] = First LValue Name
                .     [1][2] = First RValue Setting
                .     [2][1] = Second LValue Setting
                .     [2][2] = Second RValue Setting
                .      .  .
                .      .  .
                .      .  .
             [250]
      

  For example, assume there is a TEST.DBF file opened in workarea three.
  Also assume that a TEST.INI file exists for TEST.DBF as follows:

    ;------------------( TEST.INI )----------------------;
    [SXKEYWORDS]                                          
    SHARED   = .T.                                        
    READONLY = .F.                                        
    ALIAS    = FOOBAR                                     
    TRIGGER  = MYTRIGGER                                  

    [USERINFO]                                            
    LASTNAME  = Scott                                     
    FIRSTNAME = Loren                                     
    ID_NUMBER = 12345                                     
    TOPSECRET = .T.                                       
    ;----------------( EOF: TEST.INI )-------------------;


  To access the value of the ID_NUMBER element of the [USERINFO] section,
  you would do this:

    ? SXINIINFO[ 3, 2, 2, 3, 2 ]    // Returns "12345"                    

                 .  .  .  .  .                                              
                 |  |  |  |  +-( RValue.  A 1 would return the LValue )     
                 |  |  |  |                                                 
                 |  |  |  +-( Third item from the [USERINFO] section )      
                 |  |  |                                                    
                 |  |  +-( Contents of [USERINFO].  A 1 returns "USERINFO" )
                 |  |                                                       
                 |  +-( Section heading, which is [USERINFO] in this case ) 
                 |                                                          
                 +-( Workarea number 3 )                                    


  To display section heading names for workarea #1, you would do this:

    FOR x := 1 TO len( SXINIINFO[ 1 ] )
        ? SXINIINFO[ 1, x, 1 ]
    NEXT


  NOTE:  Although you CAN modify any of the elements in the SXINIINFO array,
         keep in mind that these changes will not be automatically written
         to the disk.  In other words, the .INI file will not be updated
         simply by altering an element of this array in memory.  To make
         permanent changes to SXINIINFO array elements, you should you your
         text editor to modify the .INI file directly.



See Also: .INI Files Sx_INIheader() _sx_INIinit()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson