Print method parameters are undocumented
The Print method of the Form or _screen shows only one parameter (the text to print) is accepted. Furthermore, the property sheet, documentation and intellisense show only the one parameter. However, more parameters are accepted as demonstrated by this code:
CLEAR
PUBLIC x
x=NEWOBJECT("tform")
x.visible=1
DEFINE CLASS tform as Form
PROCEDURE init
FOR i = 1 TO 10
IF .t.
thisform.Print(TRANSFORM(i),20*i,20*i)
ELSE
thisform.CurrentX=20*i
thisform.CurrentY=20*i
thisform.Print(TRANSFORM(i))
ENDIF
ENDFOR
ENDDEFINE
The 2nd and 3rd parameters are optional and specify the x,y coordinate at which to print the string.
Comments
- Anonymous
August 11, 2005
Eeeeeeek a public variable. Everytime I use one, I get pounced upon by other VFP programmers. ;-) - Anonymous
September 20, 2006
> Eeeeeeek a public variable. Everytime I use
> one, I get pounced upon by other VFP
> programmers. ;-)
Sample code has different requirements from production code, one of which is that it should work if pasted into a program and executed. If the form wasn't public, it would go out of scope and the example wouldn't work.