define a measurement doesn't seem to work 
Author Message
 define a measurement doesn't seem to work

hello,

I tried to make a program to print some data on _exact_ positions with
postscript. Because we want to work with centimeters, i define:

/cm {28.3 mul}

further, i try to move to the wanted position:

13.7 cm 24.8 cm moveto

and my ghostscript complains:

Error: /undefined in cm
Operand stack:
   cm   --nostringval--   13.7

...

what am i doing wrong?

Thank you
Koen Breugelmans



Mon, 11 Mar 2002 03:00:00 GMT  
 define a measurement doesn't seem to work

Quote:

> hello,

> I tried to make a program to print some data on _exact_ positions with
> postscript. Because we want to work with centimeters, i define:

> /cm {28.3 mul}

> further, i try to move to the wanted position:

> 13.7 cm 24.8 cm moveto

> and my ghostscript complains:

> Error: /undefined in cm
> Operand stack:
>    cm   --nostringval--   13.7

> ...

> what am i doing wrong?

You're forgetting to actually define the "cm" operator.

It needs to read like this:

  /cm {28.3 mul} def

--



Mon, 11 Mar 2002 03:00:00 GMT  
 define a measurement doesn't seem to work

Quote:



>> I tried to make a program to print some data on _exact_ positions with
>> postscript. Because we want to work with centimeters, i define:

>> /cm {28.3 mul}

>You're forgetting to actually define the "cm" operator.
>It needs to read like this:

>  /cm {28.3 mul} def

For a slight improvement in efficency try:
   /cm {28.3 mul} bind def

--
                                        -- Rod --



Mon, 11 Mar 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. comparisons between decimal and hex values doesn't seem to work

2. location.replace doesn't seem to work

3. focus() doesn't seem to work in IE-6

4. STMAdmin.dll to query NT Log doesn't seem to work properly

5. CDONTS.DLL doesn't seem to work.

6. My Script...Doesn't Seem to Work

7. response.expires doesn't seem to work!

8. GS 3.51 on PC doesn't seem to find fonts

9. 'history' command doesn't work

10. Can't seem to make server-side VBScript work

11. Why LoadPicture() works on local pathes and doesn't work on the URLS

12. works / doesn't work, why?

 

 
Powered by phpBB® Forum Software