为便于查看,其中部分代码的格式稍微作了调整。
Some of the code has been slightly reformatted for ease of viewing.
我将使用如下的通用格式来检查每一种代码味道。
I'll use the following general format as we examine each code smell.
将格式与函数分离的更清晰、因而也更好的代码是。
Even better code, because it is clearer and separates form from function, would be.
在该程序中,您可以输入通用的格式化代码。
In that procedure you can enter your custom formatting code.
两个版本包含同样的文本,只有格式化代码不同。
Both versions contain the same text — only the formatting codes are different.
目标语言通常为二进制格式(如机器代码),但不总是这种格式。
Often the target language is a binary format like machine code, but not always.
下面这段代码格式化数据,并设置约会表单上的值。
This code formats the data and sets the values on the appointment form.
这段代码将粗体格式应用到当前选中的范围。
This code applies bold formatting to the currently select range.
XML以三种不同的格式显示,包括树表、元素视图和源代码视图。
XML is displayed in three different formats, including tree table, element view, and source view.
这种新语言所需的代码更少,并且格式易于阅读。
This new language requires less coding and has a human-readable form.
这就需要在进行开发和调试时对代码进行格式化。
The problem is keeping code formatted while you develop and debug.
您可以使用它来播放视频、转换视频代码和播放流格式视频。
You can use it to play video, transcode video, and serve streaming video.
清单17.右对齐格式按钮的代码。
Listing 17. Code to add the Justify Right formatting button.
请参阅页面的源代码,查看格式化的plist。
格式化的HTML代码,使其更易于阅读和编辑。
在这种情况下,将创建ANSI系统代码页格式的项目文件。
In this case, project files will be created in ANSI in the system code page.
在这种情况下,将创建ANSI系统代码页格式的项目文件。
In this case, project files will be created in ANSI in the system code page.
应用推荐