关键词是 ZPL 的一个重要组成部分,用于控制程序流、输出结果,以及执行一些重要任务如修改镜头参数及进行光线追迹等。
关键词的基本用法为:
KEYWORD argument1, argument2, argument3…
有些关键词不带参数,而另一些有多个参数。参数可能为数值表达式、字符串常量或字符串变量。还有一些关键词接受数值与字符串的混合变量。
我们将在本章后面部分及第三章中对不同的关键词作进一步介绍。
作为参考,现将 ZPL 中涉及到的关键词列表于下:
APMN, APMX, APTP, APXD, APYD
ATYP, AVAL
BEEP
CALLMACRO
CALLSETDBL
CALLSETSTR
COAT
CLOSE
CLOSEWINDOW
COLOR
COMMAND
COMMENT
CONI
CONVERTFILEFORMAT
COPYFILE
CURV
DECLARE
DEFAULTMERIT
DELETE
DELETECONFIG
DELETEFILE
DELETEMCO
DELETEMFO
DELETEOBJECT
DELETETOL
EDVA
END
EXPORTBMP
EXPORTCAD
EXPORTJPG
EXPORTWMF
FINDFILE
FLDX, FLDY, FWGT, FVDX, FVDY,
FVCX, FVCY, FVAN
FOR, NEXT
FORMAT
FTYP
GCRS
GDATE
GETEXTRADATA
GETGLASSDATA
GETLSF
GETMTF
GETPSF
GETSYSTEMDATA
GETTEXTFILE
GETVARDATA
GETZERNIKE
GLAS
GLASSTEMPLATE
GLENSNAME
GLOBALTOLOCAL
GOSUB, SUB, RETURN, and END
GOTO
GRAPHICS
GTEXT
GTEXTCENT
GTITLE
HAMMER
IF-THEN-ELSE-ENDIF
IMA
IMAGECOMBINE
IMAGEEXTRACT
IMASHOW
IMASUM
IMPORTEXTRADATA
INPUT
INSERT
INSERTCONFIG
INSERTMCO
INSERTMFO
INSERTOBJECT
INSERTTOL
LABEL
LINE
LOADARCHIVE
LOADCATALOG
LOADDETECTOR
LOADLENS
LOADMERIT
LOADTOLERANCE
LOCALTOGLOBAL
LOCKWINDOW
MAKEFACETLIST
MAKEFOLDER
MODIFYSETTINGS
NEXT
NSLT
NSTR
NUMFIELD
NUMWAVE
OPEN
OPENANALYSISWINDOW
OPTIMIZE
OPTRETURN
OUTPUT
PARM
PARAXIAL
PAUSE
PIXEL
PLOT
PLOT2D
POLDEFINE
POLTRACE
POP
PRINTFILE
PRINTWINDOW
PWAV
QUICKFOCUS
RADI
RANDOMIZE
RAYTRACE
RAYTRACEX
READ
READNEXT
READSKIP
READSTRING
RELEASE
RELOADOBJECTS
REM, !, #
REMOVEVARIABLES
RENAMEFILE
RETURN
REWIND
SAVEARCHIVE
SAVEDETECTOR
SAVELENS
SAVEMERIT
SAVETOLERANCE
SAVEWINDOW
SCATTER
SDIA
SETAIM
SETAIMDATA
SETAPODIZATION
SETCONFIG
SETDETECTOR
SETMCOPERAND
SETNSCPARAMETER
SETNSCPOSITION
SETNSCPROPERTY
SETOPERAND
SETSTDD
SETSURFACEPROPERTY, SURP
SETSYSTEMPROPERTY, SYSP
SETTEXTSIZE
SETTITLE
SETTOL
SETUNITS
SETVAR
SETVECSIZE
SETVIG
SHOWBITMAP
SHOWFILE
SOLVEBEFORESTOP
SOLVERETURN
SOLVETYPE
STOPSURF
SUB
SURFTYPE
TELECENTRIC
TESTPLATEFIT
THIC
TIMER
TOLERANCE
UNLOCKWINDOW
UPDATE
VEC1, VEC2, VEC3, VEC4
WAVL, WWGT
XDIFFIA
ZBF2MAT
ZBFCLR
ZBFMULT
ZBFPROPERTIES
ZBFREAD
ZBFRESAMPLE
ZBFSHOW
ZBFSUM
ZBFTILT
ZBFWRITE
ZRD2MAT
ZRDAPPEND
ZRDFILTER
ZRDPLAYBACK
ZRDSAVERAYS
ZRDSUM