SP_VARLEN

VARLEN()

  Short:
  ------
  VARLEN() Returns length of a variable  of any type

  Returns:
  --------
  <nLength> => Length of variable

  Syntax:
  -------
  Varlength(expX)

  Description:
  ------------
  Converts expX to character with VAR2CHAR() and then
  returns its length

  Examples:
  ---------
   VARLEN(123.45)    //returns 6

   VARLEN(.F.)       //returns 3

   VARLEN(DATE())  //returns 8

  Source:
  -------
  S_VARLEN.PRG

 

SP_VAR2CHAR

VAR2CHAR()

  Short:
  ------
  VAR2CHAR() Converts any type variable to character type

  Returns:
  --------
  <cCharVal> => value as character

  Syntax:
  -------
  Var2char(expX)

  Description:
  ------------
  Converts variable in <expX> to type character

  Examples:
  ---------
   dtype := ctod("01/01/80")

   ntype := 128.45

   ltype := .t.

   VAR2CHAR(dtype)   // returns "01/01/80"

   VAR2CHAR(ntype)   // returns "128.45"

   VAR2CHAR(ltype)       //returns ".t."

  Warnings:
  ----------
  Numerics will be returned with a length of 10 minimum

  You may wish to trim this.

  Notes:
  -------
  Returns memo types as ""

  PREVIOUSLY ACCEPTED THE 'NAME' OF THE VARIABLE. NOW
  THE VALUE IS PASSED IN DIRECTLY.

  Source:
  -------
  S_VAR2.PRG

 

SP_UNSELECTED

UNSELECTED()

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

  Returns:
  --------
  <nColor> => numeric color integer for unselected
  color setting

  Syntax:
  -------
  UNSELECTED()

  Description:
  ------------
  Returns numeric color integer for use with functions
  which require it

  like ATT(), PRNT().

  Examples:
  ---------
   nUnsel = UNSELECTED()

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

  Notes:
  -------

  Source:
  -------
  S_UNSEL.PRG

 

SP_UNIQFNAME

UNIQFNAME()

  Short:
  ------
  UNIQFNAME() Creates a unique file name

  Returns:
  --------
  <cUniqueName> => unique file name

  Syntax:
  -------
  UNIQFNAME(cExtension,[cPath],[cPrefix])

  Description:
  ------------
  Attempts to create a unique file name using
  <cExtension> extension for file.

  [cPath]     path to check

  [cPrefix]   prefix (first letter) of file name
  (defaults to U)

  Examples:
  ---------
   cTempfile := UNIQFNAME("DBF")

   cTempfile := UNIQFNAME("NTX","C:\local\")

  Source:
  -------
  S_UNIQF.PRG

 

SP_UNBOX

UNBOX()

  Short:
  ------
  UNBOX() Removes a box created by makebox()

  Returns:
  --------
  Nothing

  Syntax:
  -------
  Unbox([cMakeBox],[nTop,nLeft,nBottom,nRight],[expRestScreen] )

  Description:
  ------------
  UNBOX restores the screen <cMakeBox> saved by
  MAKEBOX(). MAKEBOX() stores the dimensions and color in the
  returned string, so it is not necessary to pass these to
  UNBOX(). If the dimensions are passed, UNBOX() assumes these are
  not part of the saved string, and assumes the string is a
  savescreen() string. If the string and any other single param
  are passed, UNBOX() assumes it is a full screen (0,0,24,79)
  restore and does so.

  [nTop,nLeft,nBottom,nRight] - the dimensions of the box.

  Use these to UNBOX() a screen saved with SAVESCREEN().

  [bcRestScreen] This is a block which can override the
  default screen restore mechanism. If passed, this screen restore
  is used instead of the default. To set back to default, pass
  this parameter as an empty string "". If passing this parameter,
  pass all other parameters as NIL. What this does, basically, is
  set up a static variable which holds the screen restore block.
  Default is {|t,l,b,r,s|restscreen(t,l,b,r,s)} or if sls_xplode()
  is (.t.), {|t,l,b,r,s|bxx_imbox(t,l,b,r,s)} (an internal
  function within S_UNBOX.PRG) .

  Examples:
  ---------
   cMsgBox := MAKEBOX(10,40,12,60,'W/R,+GR/R')

   @11,42 SAY "What's up, Doc ?"

   inkey(0)

   UNBOX(cMsgBox)

   // to set up the alternate screen restore method:
  unbox(nil,nil,nil,nil,nil,{|t,l,b,r,s| ss_fade(t,l,b,r,s)})
  unbox(nil,nil,nil,nil,nil,{|t,l,b,r,s| ss_fall(t,l,b,r,s,100)} )

   // to set screen restore back to the default
  unbox(nil,nil,nil,nil,nil,"")

  Source:
  -------
  S_UNBOX.PRG