SP_ATT

ATT()

  Short:
  ------
  ATT() Colors a section of the screen, leaving the text intact

  Returns:
  --------
  <cUnder> => Underlying screen before change

  Syntax:
  -------
  Att(nTop,nLeft,nBottom,nRight,nColorAttribute)

  Description:
  ------------
  <nTop>             - top row
  <nLeft>            - left col
  <nBottom>          - bottom row
  <nRight>           - right column
  <nColorAttribute>  - attribute to set area  (numeric color )

  Saves and returns the underlying screen at <ntop,nLeft,nBottom,nRight>

  Examples:
  ---------
   ATT(5,5,10,10,79)   // sets 5,5,10,10 to +W/R

  Notes:
  ------
  This was a C file previously

  Source:
  -------
  S_ATT.PRG

 

SP_AT2CHAR

AT2CHAR()

  Short:
  ------
  AT2CHAR() Returns the String color equivalent of a color number

  Returns:
  --------
  <cColorString> => Color string

  Syntax:
  -------
  AT2CHAR(nColorAttribute)

  Description:
  ------------
  <nColorAttribute> the numeric color to be converted,
  is changed to <cColorString>, a clipper color string.

  Examples:
  ---------
   AT2CHAR(47)  // =>  "W/G"

  Source:
  -------
  S_AT2C.PRG

 

SP_ASUM

ASUM()

  Short:
  ------
  ASUM() Determines the sum of an array with condition

  Returns:
  --------
  <nArraySum> => Array sum

  Syntax:
  -------
  ASUM(aTarget,[bCondition])

  Description:
  ------------
  <aTarget> is the target array. Normally an array of
  numeric values. [bCondition] is an optional codeblock used to
  select a subset of the array. This could be used to filter out
  0's or non-numeric elements.

  The block must accept an array element as a
  parameter, and return true or false <expL> to determine if this
  element is part of the desired subset.

  Examples:
  ---------
   v := ASUM(aSales)
   v := ASUM(aSales,{|e|valtype(e)=="N".and.e<>0})

  Source:
  -------
  S_ASTATS.PRG

 

SP_ASTDDEV

ASTDDEV()

  Short:
  ------
  ASTDDEV() Standard deviation of an array with condition

  Returns:
  --------
  <nStdDev> => Standard deviation

  Syntax:
  -------
  ASTDDEV(aTarget,[bCondition])

  Description:
  ------------
  <aTarget> is the target array. Normally an array of
  numeric values. [bCondition] is an optional codeblock used to
  select a subset of the array. This could be used to filter out
  0's or non-numeric elements. The block must accept an array
  element as a parameter, and return true or false <expL> to
  determine if this element is part of the desired subset.

  Examples:
  ---------
   v := ASTDDEV(aSales)
   v := ASTDDEV(aSales,{|e|valtype(e)=="N".and.e<>0})

  Source:
  -------
  S_ASTATS.PRG

 

SP_ASORTMULTR

ASORTMULTR()

  Short:
  ------
  ASORTMULTR() Reverse sort multiple arrays on order of single array

  Returns:
  --------
  Nil

  Syntax:
  -------
  ASORTMULTR(aArray1,aArray2,[...aArray15])

  Description:
  ------------
  Sorts [aArray2] through [aArray15] based on the sort
  results of [aArray1]. Sort is in reverse (descending) order. All
  arrays must be of the same length! [aArray3]-[aArray15] are
  optional.

  Examples:
  ---------
   // sort the fieldname array, as well as the arrays containing
   // field types, lengths, and decimals

   ASORTMULTR(aFieldNames,aFieldTypes,aFieldLens,aFieldDeci)

  Notes:
  -------
  ASORTMULT() does the same, except sorts in ascending
  order

  Source:
  -------
  S_AMSORT.PRG

 

SP_ASORTMULT

ASORTMULT()

  Short:
  ------
  ASORTMULT() Sort multiple arrays on order of single array

  Returns:
  --------
  Nil

  Syntax:
  -------
  ASORTMULT(aArray1,aArray2,[...aArray15])

  Description:
  ------------
  Sorts [aArray2] through [aArray15] based on the sort
  results of [aArray1]. All arrays must be of the same length!
  [aArray3]- [aArray15] are optional.

  Examples:
  ---------
   // sort the fieldname array, as well as the arrays  containing
   // field types, lengths, and decimals

   ASORTMULT(aFieldNames,aFieldTypes,aFieldLens,aFieldDeci)

  Notes:
  -------
  ASORTMULTR() does the same, except sorts in reverse
  order

  Source:
  -------
  S_AMSORT.PRG

 

SP_ASCIITABLE

ASCIITABLE()

  Short:
  ------
  ASCIITABLE() Pops up an ASCII table for character selection

  Returns:
  --------
  <nChar> => ascii value of character selected

  Syntax:
  -------
  ASCIITABLE([bAction],[cTitle],[nStart])

  Description:
  ------------
  This is a popup ASCII table, allowing selection of an
  ASCII character [bAction] optional codeblock which will be
  eval'd and passed the character if a character is selected. i.e.
  eval(codeblock,chr(nChar))

  [cTitle] is an optional box title. Default is none.

  [nStart] is an optional starting ASCII number.
  Default is 1.

  Examples:
  ---------
   IF ( nChar := ASCIITABLE() ) > 0
     cChar := chr(nChar)
   ENDIF

  Source:
  -------
  S_ASCII.PRG

 

SP_ARRAY2DBF

ARRAY2DBF()

  Short:
  ------
  ARRAY2DBF() Replaces current record with values in an array

  Returns:
  --------
  Nil

  Syntax:
  -------
  ARRAY2DBF(aValues)

  Description:
  ------------
  Replaces the values in the current record with the
  values in <aValues>. Array order is assumed to be the same as
  the ordinal field order.

  Examples:
  ---------
   use customer
   a := DBF2ARRAY()            // store values

   for i = 1 to len(a)
     @0+i,0 get a[i]
   next
   read                        // edit them

   if AUPDATED(a)              // if they were updated from
                               // the DBF values
     ARRAY2DBF(a)              // save them
   endif

  Source:
  -------
  S_DBARR.PRG

 

SP_ARRANGE

ARRANGE()

  Short:
  ------
  ARRANGE() Rearranges text in a string

  Returns:
  --------
  <cNewString> => String rearranged

  Syntax:
  -------
  ARRANGE(cInString,nStart,nLength,nNewPosit)

  Description:
  ------------
  Extracts text from <cInString> starting at <nStart>
  for a length of <nLength> and moves it to position
  <nNewPosition>.

  Examples:
  ---------
   cString := "SUPERFUNCTION"
   cString := ARRANGE(cString,6,8,1)
    // =>  "FUNCTIONSUPER"

  Notes:
  ------
  New position is position AFTER text is cut from
  original position

  Source:
  -------
  S_ARRANG.PRG

 

SP_APPENDIT

APPENDIT()

  Short:
  ------
  APPENDIT() Intelligent APPEND FROM replacement

  Returns:
  --------
  Nothing

  Syntax:
  -------
  APPENDIT()

  Description:
  ------------
  Allows appending records from a database of
  dissimiliar structures, allowing point-and-shoot selection of
  field to field import. Import All/Query matches or Tagged
  records. There are no parameters, but a database is required to
  be open.

  Examples:
  ---------
   USE CUSTOMER
   APPENDIT()            // metafunction, menu driven

  Notes:
  -------
  This can be painfully slow on a busy network

  Source:
  -------
  S_APPEND.PRG