SP_STRETCH

STRETCH()

  Short:
  ------
  STRETCH() Embeds characters in a string

  Returns:
  --------
  <cStretched> => string with characters imbedded

  Syntax:
  -------
  STRETCH(cSource,cFill,nEvery)

  Description:
  ------------
  Imbeds character <cFill> in string <cSource> every
  <nEvery> character

  Examples:
  ---------
   cString := "SUPERFUNCTION"

   cString := STRETCH(cString,' ',1)

   // (returns "S U P E R F U N C T I O N")

  Notes:
  -------
  This name might be called EXPAND in other parts

  Source:
  -------
  S_STRETC.PRG

 

SP_STOD

STOD()

  Short:
  ------
  STOD() Returns date from string in the form YYYYMMDD

  Returns:
  --------
  <dDate> => date from string

  Syntax:
  -------
  STOD(cStringDate)

  Description:
  ------------
  Returns date from string of the form YYYYMMDD
  <cStringDate>

  Examples:
  ---------
   cStrdate := "19890102"

   dNewdate := STOD(cStrdate)

   // (returns 01/02/89 type date)

  Source:
  -------
  S_STOD.PRG

 

SP_STARTSW

STARTSW()

  Short:
  ------
  STARTSW() Determines if a string starts with another string

  Returns:
  --------
  <lStartsWith> => String 1 starts with string 2

  Syntax:
  -------
  STARTSW(cTarget,cStarts)

  Description:
  ------------
  Determines if string 1 <cTarget> starts with string 2
  <cStarts>

  Examples:
  ---------
   cStr1    := "SUPERFUNCTION"

   cStr2    := "SUPER"

   cStr3    := "SOUP"

   STARTSW(cStr1,cStr2)    //returns .t.

   STARTSW(cStr1,cStr3)    //returns .f.

  Source:
  -------
  S_STARTS.PRG

 

SP_STANDARD

STANDARD()

  Short:
  ------
  STANDARD() Returns color integer for standard setting

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

  Syntax:
  -------
  STANDARD()

  Description:
  ------------
  Returns numeric color integer for use with functions
  which require it like ATT(), PRNT().

  Examples:
  ---------
   nStan := standard()+128   && blinking

   PRNT(10,10,"Waiting...",nStan)

  Source:
  -------
  S_STAN.PRG

 

SP_STAGFIELDS

STAGFIELDS()

  Short:
  ------
  STAGFIELDS() Tag fields

  Returns:
  --------
  aTagged => an array of element #'s of the tagged items

  Syntax:
  -------
  STAGFIELDS([aFieldnames],[cTitle],[cMark])

  Description:
  ------------
  Tags selected items in an array of fields, returning
  an array of element #'s of tagged items in the array of fields.

  [aFieldNames] - an array of field names. Default -
  all fields

  [cTitle]      - title for the popup. Default none

  [cMark]       - character used to mark as tagged.

                          Default is checkmark chr(251)

  Examples:
  ---------
   aTagged := STAGFIELDS()

   for i = 1 to len(aTagged)

     ?field(aTagged[i])   // fieldname

   next

  Source:
  -------
  S_TAGF.PRG

 

SP_STABMENU

STABMENU()

  Short:
  ------
  STABMENU() Tabular (grid style) menu

  Returns:
  --------
  <nSelection> => Number of menu option selected

  Syntax:
  -------
  STABMENU(nTop,nLeft,nBottom,nRight,aPrompts,[nStart])

  Description:
  ------------
  Does a tabular (grid) menu based on an array of
  prompts passed as <aPrompts>. Dimensions of the menu table will be
  <nTop,nLeft,nBottom,nRight>. Number of menu rows is
  the number of rows Number of menu columns is determined based on
  number of rows. Prompts are layed out in a snaking fashion :

     e.g. (for a 3 row table...)

       column 1, row 1  = 1st prompt
       column 1, row 2  = 2nd prompt
       column 1, row 3  = 3rd prompt
       column 2, row 1  = 4th prompt

  Pressing a character will move to the next matching
  prompt with that first letter. Left-right and up-down perform a
  snaking pattern

  Pressing ENTER causes selection to be made, and the
  number of the selection to be returned.

  Pressing ESCAPE returns 0.

  [nStart] Optional starting options. Default is 1.

  Examples:
  ---------
   nChoice := ;
          stabmenu(10,10,14,70,{"One","two","three","four",;
                        "five","six","seven","eight",;
                        "nine","ten","eleven","twelve"}, 5)

  Notes:
  -------
  This is a non-popup version of PSTABMENU(), and will
  remain on the screen when done.

  Source:
  -------
  S_TABMEN.PRG