home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a040 / 2.ddi / SHRWARE4.ARC / MSAFILE.INC < prev    next >
Encoding:
Text File  |  1988-06-03  |  1.3 KB  |  66 lines

  1. <<* MSAFILE.INC *>>
  2. <<#
  3.  
  4. procedure GenFileVars
  5. begin
  6.   filespec( dbfnam,fpath,fname,fext )
  7. #>>
  8. DBFname = {"}{fname}.DBF{"}
  9.   <<fname := substr( fname,1,7 )>>
  10. DBFtemp = {"}{fname}$.DBF{"}
  11. <<#
  12. end <<*GenFileVars*>>
  13.  
  14.  
  15. function GetIndexExt : string
  16. begin
  17.     RETURN 'IDX'
  18. end <<*GetIndexExt*>>
  19.  
  20.  
  21. procedure GenIndexVars
  22. begin
  23.   forall indexes
  24.     filespec( ndxnam,fpath,fname,fext )
  25.     fext := GetIndexExt
  26. #>>
  27. NDXnam{ndxcount} = {"}{fname}.{fext}{"}
  28. NDXkey{ndxcount} = {"}{ndxkey}{"}
  29. <<#
  30.   endfor
  31. end <<*GenIndexVars*>>
  32.  
  33.  
  34. function GetIndexList( indexchoice : integer ) : string
  35. string ndxnames
  36. begin
  37.   <<*--Start with selected index--*>>
  38.   ndxnames := '&NDXnam' + str( indexchoice )
  39.   forall indexes
  40.     if ndxcount <> indexchoice
  41.       ndxnames := ndxnames + ',&NDXnam' + str( ndxcount )
  42.     endif
  43.   endfor
  44.   RETURN ndxnames
  45. end <<*GetIndexList*>>
  46.  
  47.  
  48. function GetIndexNames( indexchoice : integer ) : string
  49. string ndxnames
  50. begin
  51.   <<*--Start with selected index--*>>
  52.   select index indexchoice
  53.   filespec( ndxnam,fpath,fname,fext )
  54.   ndxnames := fname + '.' + GetIndexExt
  55.   forall indexes
  56.     if ndxcount <> indexchoice
  57.       filespec( ndxnam,fpath,fname,fext )
  58.       ndxnames := ndxnames + ',' + fname + '.' + GetIndexExt
  59.     endif
  60.   endfor
  61.   RETURN ndxnames
  62. end GetIndexNames
  63.  
  64. <<* EOF: MSAFILE.INC *>>
  65. #>>
  66.