>>>This is some kind of character code that positions data onto
>>>a FRM file. Does any know how this works? I know you need
>>>to setup some kind of an offset for X and Y coordinates.
>>
>>IMHO, this is a printer code send to printer, If you can remember in days of dos programming, we use to send printer codes through escape character+... to give effects like bold, italics etc.
>>
>>27 is the ascii code for escape..
>
>hi vinod and thanks for answering....Can you tell me what the below code does?
>function xy_offset
* Function for setting offsets
>parameter nx,ny
*passing 2 parameters as row and col i.e. x and y (n because its
numeric)
>private x,y
>xoffset=0
* x offset initialised to 0
>yoffset=0
>x=str(nx+xoffset)
* now in original x value adding the offset & converting it to character type..
>y=str(ny+yoffset)
* same way with y
>?? chr(27)+'*p'+alltrim(x)+'X'
* here it is sending the printer control code, if you know for which printer the code was designed, you can check the manual of the printer that what function printer will do,
if it gets the code chr(27)+"*p"+"12"+'X'
(here 12 I have just taken a value for nx+offset...)
>?? chr(27)+'*p'+alltrim(y)+'Y'
>return
>
>thanks..rob
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only