SP_ENHANCED

ENHANCED()

  Short:
  ------
  ENHANCED() Returns color integer for ENHANCED setting

  Returns:
  --------
  <nColor> => color integer for ENHANCED setting

  Syntax:
  -------
  ENHANCED()

  Description:
  ------------
  Gets the 2nd part of the color string and converts it
  to color INTEGER

  Examples:
  ---------
   nEnh := ENHANCED()
   ATT(10,10,10,20,nEnh)

  Notes:
  -------
  See appendix for more info on Super.Lib color usage

  Source:
  -------
  S_ENHAN.PRG

 

SP_ENDSWITH

ENDSWITH()

  Short:
  ------
  ENDSWITH() Determines if a string ends with another string

  Returns:
  --------
  <lEndsWith> => True or False, string 2 ends with
  string 1

  Syntax:
  -------
  ENDSWITH(cTarget,cEndsWith)

  Description:
  ------------
  Determines if string 1 <cTarget> ends with string 2
  <cEndsWith>

  Examples:
  ---------
   cStr1    = "SUPERFUNCTION"
   cStr2    = "FUNCTION"
   cStr3    = "FUNKY"
   ENDSWITH(cStr1,cStr2)  //returns .t.
   ENDSWITH(cStr1,cStr3)     //returns .f.

  Source:
  -------
  S_ENDSW.PRG

 

SP_ED_G_PIC

ED_G_PIC()

  Short:
  ------
  ED_G_PIC() Returns appropriate picture for getting a field

  Returns:
  --------
  <cPicture> picture clause

  Syntax:
  -------
  ED_G_PIC(cFieldName)

  Description:
  ------------
  Returns a picture clause appropriate for editing
  field where <cFieldName> is the name of the field. Applicable to
  Character and numeric fields

  Examples:
  ---------
   @10,10 GET AMOUNT PICT ED_G_PIC("AMOUNT")
   * would return a picture of "9999.99" depending
   * on length and decimals

  Source:
  -------
  S_EDPICT.PRG

 

SP_EDITMEMOV

EDITMEMOV()

  Short:
  ------
  EDITMEMOV() Performs a windowed memoedit() on a string

  Returns:
  --------
  <cBuffer> => changed string

  Syntax:
  -------
  EDITMEMO(cBuffer,[nTop,nLeft,nBottom,nRight],[lModify],;
            [nLineLength],[cTitle])

  Description:
  ------------
  Pops up a box allowing memo editing of a string.
  Edits string <cBuffer>. Options for import and export as well.

  Escape exits, F10 saves [cBuffer]. Uses coordinates
  2,10,20,69 unless passed coordinates as
  [nTop,nLeft,nBottom,nRight]

  [lModify] - True = allow edit (default), False = view
  only

  [nLineLength] - line length - default is window
  width-1

  [cTitle]  Title (max 25 characters) Default is MEMO PAD (new to 3.5)

  Examples:
  ---------
   cNew := editmemov("Good golly miss molly!")
   cNew := editmemov(memoread("DOCS.DOC"),2,2,22,78)
   cNew := editmemov(memoread("DOCS.DOC"),2,2,22,78,.f.)

  Notes:
  -------
  If editing, must have a box width of at least 50.
  Unlike EDITMEMO, this works on a memvar and returns a memvar.

  Source:
  -------
  S_EDITM.PRG

 

SP_EDITMEMO

EDITMEMO()
  Short:
  ------
  EDITMEMO() Performs a windowed memoedit() on a memo field

  Returns:
  --------
  <lChanged> -> Was the memo field changed

  Syntax:
  -------
  EDITMEMO([cMemoName],[nTop,nLeft,nBottom,nRight],;
        [lModify],[nLineLength],[cTitle])

  Description:
  ------------
  Pops up a box allowing editing of a memo field.
  Escape exits, F10 saves.

  Options for import and export as well.

  Edits field named MEMO by default, otherwise edits
  fieldname passed as [cMemoName]. Uses coordinates 2,10,20,69
  unless passed coordinates as [nTop, nLeft, nBottom, nRight]

  [lModify] - True = allow edit (default), False = view only

  [nLineLength] - line length - default is window width-1

  [cTitle]  Title (max 25 characters) Default is MEMO PAD (new to 3.5)

  Examples:
  ---------
   editmemo()
   editmemo("NOTES")
   editmemo("NOTES",2,2,22,78)
   editmemo("NOTES",2,2,22,78,.f.)

  Notes:
  -------
  If editing, must have a box width of at least 50
  Requires a memo FIELD - will not work on a memvar.

  See EDITMEMOV() to edit memvars.

  Source:
  -------
  S_EDITM.PRG

 

SP_EDITDB

EDITDB()
  Short:
  ------
  EDITDB() Customized database browser with edit/add/search
  capabilities

  Returns:
  --------
  Nothing

  Syntax:
  -------
  EDITDB([lModify],[aFields,aFieldDesc],[lBypassAsk],[lBypassLeave],;
         [nLock])

  Description:
  ------------
  Customized browse interface allowing searching, goto,
  vertical view and (if <lModify> is True) add edit delete.

  Also allows limiting of fields viewed.

  [lModify] allows add-edit-delete or not.

  The two arrays [aFields, aFieldDesc] are of field
  names and field descriptions. Default is all fields, field names
  as descriptions.

  [lByPassAsk] allows bypass of the "BROWSE ALL/SELECT
  FIELDS" opening menu choice, and defaults to .f.

  [lByPassLeave] allows bypass of "Quit?" dialog. Just quits

  [nLock] number of columns to lock (default is 0)

  Examples:
  ---------
   USE CUSTOMER

   aFlds := {"FNAME","LNAME","MI"}
   aDesc := {"First","Last","Middle"}
   editdb(.t.,aFlds,aDesc)

  Notes:
  -------
  Allows record deletion, but does not pack. Does not
  'SET DELETED' one way or the other.

  Source:
  -------
  S_EDIT.PRG

 

SP_DUPLOOK

DUPLOOK()

  Short:
  ------
  DUPLOOK() Locates possible duplicates based on user criteria

  Returns:
  --------
  nothing

  Syntax:
  -------
  DUPLOOK([cInfo],[aIndexes])

  Description:
  ------------
  Searches current dbf for exact duplicates of field(s)
  selected by user. User picks a field or fields, DUPLOOK()
  creates an index and prepares a possible duplicates report.

  [cInfo] is a character expression as additional info
  for each report line printed. (report normally only refers to
  record# and the fields selected )

  [aIndexes] is an array of currently open index files
  to be reopened on exit from duplook() (up to 10)

  Examples:
  ---------
   aIndexOpen := {"CUSTOMER","STATE","ZIPCODE"}
   DUPLOOK("Lastname+'  '+Firstname",aIndexOpen)
   * the fields the user picks to check duplicates
   * on,the LASTNAME and FIRSTNAME fields are also
   * printed on the report.
   Sample Output:
   Record #    FNAME
       1   GARRY
       2   GARRY

  Warnings:
  ----------
  THIS FUNCTION CLOSES ANY OPEN INDEXES YOU WILL NEED
  TO RE-OPEN INDEXES ON EXIT. (UNLESS YOU PASS AN ARRAY OF OPEN
  INDEXES AS ABOVE...)

  Source:
  -------
  S_DUP.PRG

 

SP_DUPHANDLE

DUPHANDLE()

  Short:
  ------
  DUPHANDLE() Duplicate record finder with delete/copy options

  Returns:
  --------
  Nil

  Syntax:
  -------
  DUPHANDLE([aFields,aDesc],[aOpenIndexes])

  Description:
  ------------
  DUPHANDLE() is similiar to DUPLOOK(), but takes a
  different approach The user is asked to select fields (only
  Character fields are presented) to check for duplication. The
  fields selected are combined into an index key, and an index is
  created. The database is then scanned for duplicates. If a
  duplicate set is found, a Tbrowse/tag window is popped up, and
  the user is asked to tag records. This continues until all
  duplicate sets are found, or the user chooses to quit the
  process. The user is then allowed to Process the tagged
  duplicate records. There are 4 possible options:

         Delete all tagged records
         Delete all NOT tagged records
         Copy all tagged records
         Copy all NOT tagged records

  The options are not mutually exclusive. For instance,
  you could copy all tagged records to a history file, and then
  delete them.

  As with all SuperLib deletions, the PACKING is left
  to you.

  [aFields,aDesc] are optional arrays of fieldnames and
  field descriptions

  [aOpenIndexes] is an optional array of currently open
  index names. Clipper has no way to determine the names of
  currently open indexes and, since this function creates
  temporary indexes, the current indexes will be closed. Only by
  having a list [aOpenIndexes] can we re-open the indexes on exit.

  Examples:
  ---------

  USE customer

  duphandle()

  Warnings:
  ----------
  Closes all indexes.

  Source:
  -------
  S_DUPH.PRG

 

SP_DTOW

DTOW()

  Short:
  ------
  DTOW() Converts date to words

  Returns:
  --------
  <cDateWords> => date as words

  Syntax:
  -------
  DTOW(dTarget)

  Description:
  ------------
  Returns date in <dTarget> as words

  Examples:
  ---------
   dDate     := ctod("10/15/89")
   cWdate     := DTOW(dDate)
   // returns "October 15, 1989"

  Source:
  -------
  S_DTOW.PRG

 

SP_DTDIFF

DTDIFF()

  Short:
  ------
  DTDIFF() Returns difference between dates

  Returns:
  --------
  <nDifference> => days,weeks,months or years between
  dates

  Syntax:
  -------
  DTDIFF(dFirst,dSecond,nUnitType)

  Description:
  ------------
  Calculates difference between <dFirst> and <dSecond>
  in quantity defined by <nUnitType> as:

  1=whole days    2=whole weeks

  3=whole months  4=whole years

  Examples:
  ---------
   dDate     := ctod("10/15/89")
   dDate2    := ctod("10/26/89")
   nDiffdays     := DTDIFF(dDate,dDate2,1)
   nDiffweeks    := DTDIFF(dDate,dDate2,2)
   nDiffmonth    := DTDIFF(dDate,dDate2,3)
   nDiffyears    := DTDIFF(dDate,dDate2,4)

  Source:
  -------
  S_DTDIFF.PRG