可接受的缩略名


在设计编程接口时,通常名称不要缩写。然而下面列出的缩写要么是固定下来的,要么是过去被广泛使用的,所以你可以继续使用。关于缩写有一些额外的注意事项:

  • 标准 C 库中长期使用的缩写形式是可以接受的。如:"alloc", "getc"
  • 你可以在参数名中更自由地使用缩写。如:"imageRep", "col"("column"), "obj", "otherWin"

常见的缩写

缩写 含义
alloc Allocate
alt Alternate
app Application
calc Calculate
dealloc Deallocate
func Function
horiz Horizontal
info Information
init Initialize
int Integer
max Maximum
min Minimum
msg Message
nib Interface Builder archive
pboard Pasteboard
rect Rectangle
Rep Representation
temp Temporary
vert Vertical

常见的略写

ASCII
PDF
XML
HTML
URL
RTF
HTTP
TIFF
JPG
GIF
LZW
ROM
RGB
CMYK
MIDI
FTP

results matching ""

    No results matching ""