Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_ftomacro() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_FTOMACRO()

 DESCRIPTION

 C_FTOMACRO() converts field names from the currently selected
 database file directly to a character string using a specified
 delimiter to be used as a macro expression.  This function is
 useful for creating macro expressions that are used by other
 functions that may require them as parameters such as C_SELECT()
 and Clipper's ACHOICE().  The C_FTOMACRO() function will supply the
 conversion needed in the character string to make all fields return
 character type data so the expression can be evaluated correctly.
 The optional starting and ending field numbers can be specified.

 NOTES

 The C_FTOMACRO() function operates on the currently selected database.

 When a macro expression is evaluated (&expr) as a character string,
 the largest string Clipper allows is 450 bytes.  The character
 string containing the macro can be 64,000 bytes, but when the
 expression is evaluated the length can not exceed 450 bytes
 (i.e. len(&expr) = 450 ).

 SYNTAX

 C_FTOMACRO([st_fld] [,end_fld] [,delimiter])

 PARAMETERS

 st_fld (N) is the optional starting field number.  If st_fld is not
 specified, the default of 1 (the first field) is used.

 end_fld (N) is the optional ending field number.  If end_fld is not
 specified, the default of all fields in the database are used.

 delimiter (C) is the delimiter used to combine each field name in
 the character string.  The delimiter can be any group of characters
 (" + '   ' + ") or a function (" + space(4) + "), but must at least
 contain a plus sign (+) to concatenate the fields for the macro.
 If delimiter is not specified, the default delimiter of
 (" + ' ' + ") is used.

 RETURNS

 C_FTOMACRO() returns a delimited character string containing field
 names to be evaluated as a macro expression.

 EXAMPLES

 select 0
 use test                  && Open database

 s1 = c_ftomacro(1,3)      && Include fields 1 through 3

 ? s1 --> "NAME + ' ' + DTOC(UPD_DATE) + ' ' + STR(SALARY,5,2)"


See Also: C_ATOMACRO() C_CHARTOA() C_ATOCHAR() C_DIRTOA()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson