hmgchang wrote:Dear Masters and Friends,
How to use the PRINT DATA with macro subtitution ( &) ?
Code: Select all
aLabel := { "one", "two", 1000000}
aFont := { { "Verdana", 10, "BOLD ITALIC UNDERLINE"}, ;
{ "Arial", 09, "BOLD ITALIC"}, ;
{ "Courier", 10, "BOLD"}}
FOR nLabel := 1 TO LEN( aLabel)
nRow := ( nLabel - 1) * 4
nCol := 5 + 4
cBIU := aFont[ nLabel, 3]
@ nRow, nCol PRINT T_AllToChar( aLabel[ nLabel]) ;
FONT aFont[ nLabel, 1] ;
SIZE aFont[ nLabel, 2]
&cBIU
// CENTER
NEXT
Get an compile error !
TIA
Best Rgds,
Chang
Only way, I found to use variables to define bold, italic, underline was to convert @ nRow, nCol PRINT phrase to function:
Code: Select all
_HMG_PRINTER_H_PRINT ( _HMG_SYSDATA[374], nStartRow, nStartCol ,;
cFontName, nFontSize,;
nColorR, nColorG, nColorB ,;
cTextToPrint ,;
lBold, lItalic, lUnderline, lOverline ,;
.T. ,;
.T. ,;
.T. ,;
cJust )
for multilines printout:
Code: Select all
_HMG_PRINTER_H_MULTILINE_PRINT ( _HMG_SYSDATA[374], nStartRow, nStartCol ,;
nEndRow, nEndCol,;
cFontName, nFontSize,;
nColorR, nColorG, nColorB ,;
cTextToPrint ,;
lBold, lItalic, lUnderline, lOverline ,;
.T. ,;
.T. ,;
.T. ,;
cJust )