SP_KBDESC

KBDESC()

  Short:
  ------
  KBDESC() Keyboards character 27 (escape) when key pressed

  Returns:
  --------
  Nothing

  Syntax:
  -------
  SET KEY xxx TO KBDESC

  Description:
  ------------
  Allows setting an alternate key to the ESCAPE key.
  ESCAPE normally means 'get me outta here', but sometimes is the
  key you need to indicate the user is done selecting or some
  such. This function allows setting another key (e.g. F10) to act
  as the ESCAPE key.

  Examples:
  ---------
   SET KEY -9 TO KBDESC

  Warnings:
  ----------
  Be sure to issue a   SET KEY xxx TO   command to
  un-map this function when done

  Notes:
  -------
  Declare as EXTERNAL i.e.

  EXTERNAL KBDESC

  Source:
  -------
  S_KBDESC.PRG

 

SP_ISVALFILE

ISVALFILE()

  Short:
  ------
  ISVALFILE() Checks a file name for validity

  Returns:
  --------
  <lValid> => is file name a valid dos file name

  Syntax:
  -------
  ISVALFILE(cName,[lCheckDup],[@cMessage])

  Description:
  ------------
  Checks the proposed file name in <cName> for
  adherance to the dos file naming conventions.

  [lCheckDup] will check for existance of the file if
  True. Default False.

  [@cMessage] a string passed by reference. The reason
  for rejection will be placed in the string. Messages returned
  are:

    "File name is empty"
    "Duplicate file exists"
    "File name is too long"
    "Too many periods"
    "Too many characters after the period"
    "Too many characters before the period"
    "Too many characters with no period"
    "Invalid character: " (character)
    "Illegal file name"

  Examples:
  ---------

   cFn := space(15)

   while .t.
     cMessage := ""
     @10,10 get cFn
     read
     @20,10 say iif(isvalfile(cFn,.t.,@cMessage),"Valid  ","Not Valid")
     @21,10 say padr(cMessage,50)
   end

  Source:
  -------
  S_ISVALF.PRG

 

SP_ISPART

ISPART()

  Short:
  ------
  ISPART() Determines if a value is part of a set

  Returns:
  --------
  <lIsPart> => if value is part of set

  Syntax:
  -------
  ISPART(expX1,expX2,[expX3],...[expX10])

  Description:
  ------------
  Compares a value <expX1> to a set of values of same
  type <expX2..expX10> to determine if it is equal to any of
  them. Returns True if it is, False otherwise. Up to 9 values to
  compare.

  Examples:
  ---------
   If ISPART(nChoice,5,6,7,12)
     MSG("Need a DBF open")
     loop
   endif

   If ISPART(cChars,"A","B","C","D")

   endif

  Source:
  -------
  S_ISPART.PRG

 

SP_ISNOTDUP

ISNOTDUP()

  Short:
  ------
  ISNOTDUP() Checks for a duplicate field

  Returns:
  --------
  <lDup>  => is duplicate field

  Syntax:
  -------
  ISNOTDUP(expCurrent,[nOrder],[bCompare],;
        [lBlankOk],[nExceptRec],[cMsg])

  Description:
  ------------
  Looks in the current DBF for <expCurrent> - an
  expression of any type. [nOrder]  is the index order to SEEK on.
  Default is INDEXORD(). [bCompare]  - in lieu of an index key,
  this block is used in a locate compare of <expCurrent> as in

  LOCATE FOR eval(bCompare)==expCurrent.

  [lBlankOk]    if <expCurrent> is blank, and this is
  .f. (the default), then and automatic .f. is returned.

  [nExceptRec]  if this is passed, will check all BUT
  this record number. Useful for editing routine, where you don't
  wish to check for a duplicate of the existing record.

  [cMsg]  the message displayed if a duplicate is
  found. Default is none.

  Examples:
  ---------

   @6,0 GET V6 valid   ;
    ISNOTDUP(v6,nil,nil,nil,nil,"Duplicate found")

   @6,0 GET V6 valid   ;
    ISNOTDUP(v6,3,nil,nil,recno(),"Duplicate found")

   @6,0 GET V6 valid  ;
     ISNOTDUP(v6,nil,{||afile->v6},nil,recno(),"Duplicate found")

  Notes:
  -------
  Normally for use in making sure a duplicate record is
  not entered.

  Source:
  -------
  S_NOTDUP.PRG

 

SP_ISMOUSEAT

ISMOUSEAT()

  Short:
  ------
  ISMOUSEAT() Checks for mouse click within passed coordinates

  Returns:
  --------
  <lClicked> => true if mouse click occured within the passed
                coordinates

  Syntax:
  -------
  ISMOUSEAT(nMouseRow, nMouseCol, nTop,nLeft,nBottom,nRight)

  Description:
  ------------
  Checks <nMouseRow>, <nMouseCol> against the coordinates
  <nTop>, <nLeft>,<nBottom>,<nRight> and returns True if the
  mouse row and col are within the screen coordinates.

  Examples:
  ---------

  case ISMOUSEAT(nMouseR, nMouseC, nBot+2, nLeft, nBot+2, nLeft+2)
     oTb:up()

  Source:
  -------
  S_MOOSE.PRG

 

SP_ISLOADED

ISLOADED()

  Short:
  ------
  ISLOADED() Determines  function is loaded or not

  Returns:
  --------
  <lIsLoaded> => is function loaded

  Syntax:
  -------
  ISLOADED(cFunction)

  Description:
  ------------
  This function will test for <cFunction> being loaded
  into memory. <cFunction > can be any function in the
  form "FUNCTION()" but must refer to a function NOT in
  CLIPPER.LIB.

  Examples:
  ---------
   if ISLOADED("QUERY()")
       @row()+1,3 prompt "Build Query"
   endif

  Source:
  -------
  S_ISLOAD.PRG

 

SP_ISINLOOK

ISINLOOK()

  Short:
  ------
  ISINLOOK() Checks for existence of a value in a lookup dbf

  Returns:
  --------
  lFound  => value was found

  Syntax:
  -------
  ISINLOOK(expCurrent,nArea,[bCompare],[lBlankOk],[cMsg])

  Description:
  ------------
  Looks for <expCurrent>, and expression of any type,
  in the workarea indicated in <nArea>.

  [bCompare]  - Normally a SEEK would be done, but if
  [bCompare] (a codeblock ) is passed, this acts as a LOCATE FOR ,
  as in LOCATE FOR eval(bCompare)

  [lBlankOk] - If this is false (the default), and
  <expCurrent> is empty, an automatic false is returned.

  [cMsg] - If this is passed, and the value is not
  found ,or is blank and <lBlankOk> is false, this message is
  displayed. Default is no message

  Examples:
  ---------
   @3,0 GET V3 WHEN  !ISINLOOK(v3,5,nil,.f.,"Not Valid or is blank")

   @4,0 GET V4 VALID ;
     ISINLOOK(v4,5,{||adbf->company},.f.,"Not Valid or is  blank")

  Source:
  -------
  S_INLOOK.PRG