Page 1 of 1

NWP, PRINTER.SYS and POSITION

Posted: Sun Feb 14, 2010 8:51 pm
by Susan Smith
Hi folks,

I'm trying to use the POSITION feature in PRINTER.SYS. This is from PRINTER.SYS:

Code: Select all

rem	*****  NWP only Positioning In Inches e.g [POSITION](2.34,4.25)
rem     *****  -parameters indicate horizontal and then vertical positions-
PRINTER NWP [POSITION], "\Eposition="
PRINTER NWP [POSITION(hhh,vvv)], "\Eposition='hhh,vvv'"
rem hhh denotes horizontal and vvv denotes vertical
Is there a way to use a variable to specify the horizontal and vertical positions?
If I use the following, nothing prints:

Code: Select all

let vert=.900
print #prtfile:"[POSITION(.5,vert)]"&"SOME TEXT"
But if I use a literal, it works:

Code: Select all

print #prtfile:"[POSITION(.5,.900)]"&"SOME TEXT"
Can anyone tell me what I'm missing?

-- Susan

Re: NWP, PRINTER.SYS and POSITION

Posted: Sun Feb 14, 2010 8:54 pm
by bluesfannoz
Try

Code: Select all

let vert=.900
print #prtfile:"[POSITION(.5,"&STR$(vert)&")]"&"SOME TEXT"



Susan Smith wrote:Hi folks,

I'm trying to use the POSITION feature in PRINTER.SYS. This is from PRINTER.SYS:

Code: Select all

rem	*****  NWP only Positioning In Inches e.g [POSITION](2.34,4.25)
rem     *****  -parameters indicate horizontal and then vertical positions-
PRINTER NWP [POSITION], "\Eposition="
PRINTER NWP [POSITION(hhh,vvv)], "\Eposition='hhh,vvv'"
rem hhh denotes horizontal and vvv denotes vertical
Is there a way to use a variable to specify the horizontal and vertical positions?
If I use the following, nothing prints:

Code: Select all

let vert=.900
print #prtfile:"[POSITION(.5,vert)]"&"SOME TEXT"
But if I use a literal, it works:

Code: Select all

print #prtfile:"[POSITION(.5,.900)]"&"SOME TEXT"
Can anyone tell me what I'm missing?

-- Susan

Posted: Sun Feb 14, 2010 9:19 pm
by Susan Smith
Thanks Steve! That did the trick.

Now back to your regular Valentine's Day programming... :wink:

-- Susan