==的值不是运算符,而是内置过程。PostScript ==运算符
PLRM第526页(pdf第540页)。
内置程序,这意味着这是PostScript过程:
{ something here }
或例如实际的功能在Java中,你必须定义自己?
==的值不是运算符,而是内置过程。PostScript ==运算符
PLRM第526页(pdf第540页)。
内置程序,这意味着这是PostScript过程:
{ something here }
或例如实际的功能在Java中,你必须定义自己?
你可以用/== load ==
来看看ghostscript的实现。
或得到这本书内部Postscript通过Frank Meritt Braswell。它有关于==
过程如何在Adobe的打印机实现中工作的完整章节。
但是简单的框架是基于运算符type
的属性,它产生一个类型名。更具体地说,它产生一个可执行文件名称,它指定参数的类型。所以你可以很容易地用字典实现一个类型切换。
<<
/integertype { } % handle integer case
/realtype { } % handle floating-point case
/arraytype { } % handle array case
>> begin
5 type exec
2.0 type exec
{a b c} type exec
不同类型的对象会导致不同的过程被执行。
使用这个,我们可以处理可能传递给过程的不同类型。
/my== {
<<
/integertype { =string cvs print }
/realtype { =string cvs print }
/arraytype { dup xcheck {
({) print {my==} forall (}) print
}{
([) print {my==} forall (]) print
} }
>> begin dup type exec
} def
=string
(书中所描述)是用于此确切的目的所使用的=
和==
程序预分配128字节的临时缓冲区:提供参数给cvs
。
谢谢,我刚刚订购了这本书。 – juFo