SP_BUNGDROP

BUNGDROP()

  Short:
  ------
  BUNGDROP() Causes dropdown during BUNGEE() menu def sequence

  Returns:
  --------
  NIL

  Syntax:
  -------
  BUNGDROP([nDown],[nOver])

  Description:
  ------------
  BUNGDROP() causes a dropdown to occur during a BUNGEE() menu
  definition sequence. This is followed by a series of BUNGOPTION()
  and then BUNGUNDROP() to end the dropdown.

  [nDown] Number of rows down from row of current option (default 1)
  [nOver] Number of columns over from column of current option
          (default is 0 for bar options, 1 for dropdown options)

  Use BUNGSTART(), BUNGEND(), BUNGOPTION(),
  BUNGDROP(), BUNGUNDROP() together to create a menu definition
  array for BUNGEE(). While it is not necessary to use these
  functions to create the array, it is helpful when you have
  a complex, multi-level dropdown structure.

  See BUNGEE for more information.

  Examples:
  ---------

  bungstart()

     bungoption("Files")
     bungdrop()
          bungoption("Open" ,{} ,{||!lFileIsOpen} )
          bungoption("Close",{||nil},{||lFileIsOpen } )
     bungundrop()
     bungoption("Edit")
     bungdrop()
          bungoption("DBF"  ,{||nil},nil )
          bungoption("Ascii",{||nil},nil )
     bungundrop()
     bungoption("Quit",{||bungeequit()},nil)

  aMenu := bungend()
  bungee(0,0,79,aMenu)

  Source:
  -------
  S_BUNGDEF.PRG

 

SP_BUILDEX

BUILDEX()

  Short:
  ------
  BUILDEX() Interactively builds and returns an expression string

  Returns:
  --------
  <cExpression> => An expandable expression string

  Syntax:
  -------
  BUILDEX(cDescript,cStart,lTypeChange,[aFields,aDesc])

  Description:
  ------------
  Interactively builds and returns an expression string.

  Pass parameters of <cDescript> - a descriptive name
  for the expression, <cStart> an existing expression
  (field,etc.),

  <lTypeChange> allow TYPE change by BUILDEX()

  Pass all or none of the following arrays

  [aFields]   An array of field names

  [aDesc]     An array of field descriptions

  Examples:
  ---------
   cExpress :=buildex("Index Expression",COMPANY,.F.)

  Notes:
  ------
  Release 3.5 adds the ability to directly edit the expression.

  Source:
  -------
  S_BUILD.PRG

 

SP_BROWSESDF

BROWSESDF()

  Short:
  ------
  BROWSESDF() Tbrowse an SDF file

  Returns:
  --------
  Nothing

  Syntax:
  -------
  BROWSESDF(cFile,aDesc,aTypes,aLengths)

  Description:
  ------------
  Tbrowses an SDF file <cFile>, using column headers in
  <aDesc>, with field 'types' in <aTypes>, and field lengths in
  <aLengths>

  Examples:
  ---------

   //sample.sdf looks like this:

   //AHLBERG              STEPHEN           23.4519890226
   //SMITH                JEFF              45.0019890301
   //SMITH                DENNIS             0.0019890313
   //ALVARADO             DAVID             25.0019890330

   //note: widths have to be exact

   browseSDF("sample.sdf",{"Last","First","Due","Date"},;
                          {"C","C","N","D"},;
                          {20,15,8,8})

  Source:
  -------
  S_BRSDF.PRG

 

SP_BROWSEDELIM

BROWSEDELIM()

  Short:
  ------
  BROWSEDELIM() Tbrowse a delimited file

  Returns:
  --------
  Nothing

  Syntax:
  -------
  BROWSEDELIM(cFile,aDesc,aTypes,aLens,[cFieldDelim],;
            [cCharDelim])

  Description:
  ------------
  Browse delimited file <cFile>.

  Column titles are contained in <aDesc> (one for each 'field').

  Field types are contained in <aTypes>, Field lengths
  are contained in <aLens>.

  [cFieldDelim] - Field delimiter - default is a comma [,]

  [cCharDelim] - Character type delimiter - default is
  a double quote [""]

  Examples:
  ---------

   //sample.asc looks like  this:

   //"AHLBERG","STEPHEN",23.45,19890226
   //"SMITH","JEFF",45.00,19890301
   //"SMITH","DENNIS",0.00,19890313
   //"ALVARADO","DAVID",25.00,19890330
   //"AMPOLSUK","EARL",60.00,19890406
   //"ANDRADE","GARRY",55.00,19890301
   //"ANDRADE","WALT",99.99,19890703

   browsedelim("sample.asc",{"First","Last","Due","Date"},;
                          {"C","C","N","D"},;
                          {15,25,6,8})

  Source:
  -------
  S_BDELIM.PRG

 

SP_BROWSE2D

BROWSE2D()

  Short:
  ------
  BROWSE2D() Popup  tbrowse of 2 dimension array (array of arrays)

  Returns:
  --------
  <nSelection> => selected item, 0 if none

  Syntax:
  -------
  BROWSE2D(nTop,nLeft,nBottom,nRight,aArr,[aHead],[cColor],;
        [cTitle],[bExcept])

  Description:
  ------------
  Pops up a box at <nTop,nLeft,nBottom,nRight> and
  tbrowses array contained in <aArr>.

  <aArr> must be a 2 dimensioned array, like the ones
  returned from DIRECTORY() or DBSTRUCT().

  i.e. { array(n),array(n),array(n) } where <n> is the
  same length for each subarray.

  [aHead] an array of column headers matching the
  number of elements in a single subarray of <aArr>. Default is
  none.

  [cColor] popup box color. Default is sls_popcol()

  [cTitle] title string for the box. Default is none.

  [bExcept] is a codeblock that will be evaluated for
  any exception keys - any keys other than up/ down/ right/ left/
  pgup/ pgdn/ home/ end/ enter/ esc. [bExcept] will be passed the
  parameters: key value, tbrowse object, element

  Examples:
  ---------

   proc test

   local a := directory()
   browse2d(5,5,20,40,a, ;
           {"File","Size","Date","Time","Attribute"},,"Choose a File")

   use customer
   a := dbstruct()
   browse2d(5,5,20,40,a,nil,nil,nil,;
    {|k|msg(str(k)+" is not a valid key")})
   // note the exception block

  Source:
  -------
  S_2DBRZ.PRG

 

SP_BOYEAR

BOYEAR()

  Short:
  ------
  BOYEAR() Determine beginning of year a date falls in

  Returns:
  --------
  <dReturn> => Date of the beginning of the year

  Syntax:
  -------
  BOYEAR([dTarget])

  Description:
  ------------
  Determines beginning of the year of a date and
  returns it as <dReturn>. [dTarget] a date variable. Default is
  DATE()

  Examples:
  ---------
   dBegyear := BOYEAR(date())

  Source:
  -------
  S_BOYEAR.PRG

 

SP_BOM

BOM()

  Short:
  ------
  BOM() Calculates beginning of the month date

  Returns:
  --------
  <dReturn> => Date which is beginning of the month

  Syntax:
  -------
  BOM(dTarget)

  Description:
  ------------
  Calculates date which is beginning of the month from
  <dTarget>

  Examples:
  ---------
   dDate := ctod("10/15/90")

   dBom  := BOM(DDate)    //    => 10/01/90

  Source:
  -------
  S_BOM.PRG