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

 

2 responses to “SP_VAR2CHAR

  1. Pingback: SP String Functions | Viva Clipper !

  2. Pingback: SP Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.