This function returns the information about the variables for debugger


      __mvDbgInfo( <nScope> [, <nPosition> [, @<cVarName>] ] )


<nScope> = the scope of variables for which an information is asked Supported values (defined in hbmemvar.ch) HB_MV_PUBLIC HB_MV_PRIVATE (or any other value) <nPosition> = the position of asked variable on the list of variables with specified scope – it should start from position 1 <cVarName> = the value is filled with a variable name if passed by reference and <nPosition> is specified


The return value depends on the number of arguments passed


This function retrieves the information about memvar variables. It returns either the number of variables with given scope (when the first argument is passed only) or a value of variable identified by its position in the variables’ list (when second argument is passed). It also returns the name of a variable if optional third argument is passed by reference.

If requested variable doesn’t exist (requested position is greater then the number of defined variables) then NIL value is returned and variable name is set to “?”

The dynamic symbols table is used to find a PUBLIC variable then the PUBLIC variables are always sorted alphabetically. The PRIVATE variables are sorted in the creation order.


Due to dynamic nature of memvar variables there is no guarantee that successive calls to retrieve the value of <Nth> PUBLIC variable will return the value of the same variable.


      #include "hbmemvar.ch"

      PROCEDURE Main()

         LOCAL nCount, i, xValue, cName

         nCount := __mvDbgInfo( HB_MV_PUBLIC )
         FOR i := 1 TO nCount
            xValue := __mvDbgInfo( HB_MV_PUBLIC, i, @cName )
            ? i, cName, xValue


         ? "PUBLIC=", __mvDbgInfo( HB_MV_PUBLIC )
         ? "PRIVATE=", __mvDbgInfo( HB_MV_PRIVATE )

         PUBLIC cPublic := "cPublic in MAIN"

         ? "PUBLIC=", __mvDbgInfo( HB_MV_PUBLIC )
         ? "PRIVATE=", __mvDbgInfo( HB_MV_PRIVATE )

         PRIVATE cPrivate := "cPrivate in MAIN"

         ? "PUBLIC=", __mvDbgInfo( HB_MV_PUBLIC )
         ? "PRIVATE=", __mvDbgInfo( HB_MV_PRIVATE )


         ? "Back in Main"
         ? "PUBLIC=", __mvDbgInfo( HB_MV_PUBLIC )
         ? "PRIVATE=", __mvDbgInfo( HB_MV_PRIVATE )


      PROCEDURE CountMemvars()
         LOCAL i, nCnt, xVal, cName
         PUBLIC ccPublic := "ccPublic"
         PRIVATE ccPrivate := "ccPrivate"

         ? "In CountMemvars"
         ? "PUBLIC=", __mvDbgInfo( HB_MV_PUBLIC )
         ? "PRIVATE=", __mvDbgInfo( HB_MV_PRIVATE )

         PRIVATE cPublic := "cPublic"

         ? "PUBLIC=", __mvDbgInfo( HB_MV_PUBLIC )
         ? "PRIVATE=", __mvDbgInfo( HB_MV_PRIVATE )

         nCnt := __mvDbgInfo( HB_MV_PRIVATE ) + 1
         FOR i := 1 TO nCnt
            xVal := __mvDbgInfo( HB_MV_PRIVATE, i, @cName )
            ? i, "=", cName, xVal

         nCnt := __mvDbgInfo( HB_MV_PUBLIC ) + 1
         FOR i := 1 TO nCnt
            xVal := __mvDbgInfo( HB_MV_PUBLIC, i, @cName )
            ? i, "=", cName, xVal



This function should be called from the debugger only.


Library is core

SP Internal Datafile Structures


  SMODULE        C       8    Calling Proc
  SFIELD         C       10   Calling variable
  SDESCR         C       25   Description/box title
  SSTRING        C       160  Display expression
  SRETURN        C       75   Return expression
  SDBFILE        C       8    DBF file
  SIND           C       8    Index file


  H_MOD          C       10   Calling Proc
  H_VAR          C       10   Calling variable
  H_MEMO         M       10   Help text
  HW_T           N       2    Window top
  HW_L           N       2    Window Left
  HW_B           N       2    Window Bottom
  HW_R           N       2    Window right


  DESC           C      45    Description of list
  LIST           C      200   Delimited string of list


  DESCRIPT       C       50   Description of the form
  MEMO_ORIG      M       10   Form letter


  CATEGORY       C       10   Category of item
  ITEM           C       60   Item description
  PRIORITY       C       2    Priority of item
  DOBY           D       8    Do by date
  DONE           L       1    Done marker
  LONG_DESC      C       231  Long description


  DBF            C      12    DBF query built for
  DES            C      30    Description of query
  FQUERY         C      220   Query expression


  SF_DBF         C   8    Dbf name
  SF_NDXKEY      C   60   Sort key(index)
  SF_MAJKEY      C   60   Major sort key
  SF_MINKEY      C   60   Minor sort key
  SF_TITLE       C   35   Report name
  SF_MAJTEXT     C   25   Major key text
  SF_MINTEXT     C   25   Minor key text
  SF_WIDTH       N   3    Pg width chrs
  SF_LENGTH      N   3    Pg length lines
  SF_LEFTM       N   2    Left margin
  SF_TOPM        N   2    Top margin
  SF_SPACE       N   1    Line spacing
  SF_PAUSE       L   1    Pause between
  SF_NPLINES     N   1    Lines left
  SF_EJB4        L   1    Eject b4 report
  SF_EJAFT       L   1    Eject aftreport
  SF_EJMAJOR     L   1    Eject on Major
  SF_EJMINOR     L   1    Eject on Minor
  SF_EJGRAND     L   1    Eject b4 Grand
  SF_UNTOTAL     L   1    Underline ttals
  SF_MAJCHR      C   1    Major underline char
  SF_MINCHR      C   1    Minor underline char
  SF_NHEAD       N   1    # header lines
  SF_NFOOT       N   1    # footer lines
  SF_NTITL       N   1    # title lines
  SF_TSEP        C   1    Title separation char
  SF_COLSEP      C   1    Col sep char
  SF_CSEPWID     N   1    Col sep width
  SF_LINESEP     C   1    Line sep char
  SF_NCOLS       N   2    # columns
  SF_FEET        M   10   Footer contents
  SF_HEADS       M   10   Header contents
  SF_STDHEAD     L   1    Use standard header
  SF_DETAILS     M   10   Detail contents
  SF_QUERY       C   100  Last used query
  SF_FULLSUM     C   1    Full / summary
  SF_PRNCODE     C   50   Printer code pre-report
  SF_AFTCODE     C   50   Printer code post-report


  DESCRIPT       C   60      Description
  WIDTH          N   2       Label width
  SPACESBETW     N   2       Spaces between labels
  LINESBETW      N   2       Lines between labels
  ACROSS         N   2       Labels across
  LMARGIN        N   2       Left margin
  HEIGHT         N   2       Label height (lines)
  SETUPCODE      C   60      Pre print setup code
  EXITCODE       C   60      Post print code
  CONTENTS       M   10      Label contents
  PRNPORT        C   10      Printer port
  SHEETS         L   1       Using hand-fed sheets?
  LBLSPAGE       N   3       Labels per page
  TOPMARG        N   2       Top margin (lines)
  PAUSE          L   1       Pause between pages
  EJECT          L   1       Eject each page
  DBFNAME        C   8       DBF name

  SETNAME        C  40    Set name
  DMAINCOL       C  40    SLS_NORMCOL() setting
  DMAINMENU      C  40    SLS_NORMMENU() setting
  DPOPCOL        C  40    SLS_POPCOL() setting
  DPOPMENU       C  40    SLS_POPMENU() setting
  DFRAME         C  40    SLS_FRAME() setting
  DSHADATT       N   3    SLS_SHADATT() setting
  DSHADPOS       N   1    SLS_SHADPOS() setting
  DEXPLODE       L   1    SLS_XPLODE()  setting


  DATE           C   8   Appointment date
  TIME           C   5   Appointment time
  DESC           C  65   Description



  TOPIC C 35


SP Internal Datafiles

 SuperLib uses a number of internal datafiles to store

 such things as queries, reports and colors.

 All of these files have default names - for instance
 queries are stored in QUERIES.DBF by default. SuperLib 3.x
 provides a series of functions to determine internal file names
 and locations.

 All of these functions start with SLSF_ (Super Lib System File )

 Function                 Purpose                Default

 SLSF_REPORT([cNew])      Stored reports         SFREPORT
 SLSF_QUERY([cNew])       Stored queries         QUERIES
 SLSF_FORM([cNew])        FORMLETR() forms       FORM
 SLSF_HELP([cNew])        Help records           HELP
 SLSF_LIST([cNew])        LISTER() definitions   PLIST
 SLSF_SCROLL([cNew])      Lookup definitions     SCROLLER
 SLSF_COLOR([cNew])       Color sets             COLORS
 SLSF_TODO([cNew])        TODOLIST() dbf         TODO
 SLSF_TDN1([cNew])        TODOLIST 1st index     TODO
 SLSF_TDN2([cNew])        TODOLIST 2nd  index    TODOP
 SLSF_TDN3([cNew])        TODOLIST 3rd  index    TODOD
 SLSF_APPT([cNew])        Appointments           APPOINT
 SLSF_LABEL([cNew])       Labels database        CLABELS
 SLSF_OLD([cNew])         O.L.D. doc database    SLOLDS

 Where [cNew] optionally sets the path and/or filename.
 If [cNew] is passed, this is the value returned as

 For example, to change the default file and place
 where reports are stored when using REPORTER(),

              // sets the report file
              // to MYREPORT.DBF in
              // c:\HIDDEN

 These take the place of the following public
 variables in earlier versions of SuperLib:

     _REPORTS   = "SFREPORT"   (for reports)
     _FORMS     = "FORM"       (for form letters)
     _QUERIES   = "QUERIES"    (for queries)
     _LISTER    = "PLIST"      (for lister)
     _TODODBF   = "TODO"       (for todo list)
     _TODONTX1  = "TODO"       (TODO category INDEX)
     _TODONTX2  = "TODOP"      (TODO priority INDEX)
     _TODONTX3  = "TODOD"      (TODO do by INDEX)
     _HELP      = "HELP"       (for help)
     _SCROLLER  = "SCROLLER"   (for scroller)
     _COLORS    = "COLORS"     (for colors)

 COLORS are now stored in a DBF file, rather than a
 .MEM file.


The secrets of array handling, part 1.

The secrets of array handling Part – 1