📄 http:^^www.cs.wisc.edu^~cs564-1^conventions.html
字号:
Date: Tue, 05 Nov 1996 00:28:07 GMTServer: NCSA/1.5Content-type: text/htmlLast-modified: Thu, 05 Oct 1995 03:22:39 GMTContent-length: 1688<HTML><HEAD><TITLE>Coding Conventions</TITLE></HEAD><BODY><CENTER><H1>Coding Conventions</H1></CENTER><P>The following conventions are recommended. Thanks due to Prof. Fischerand Ranjani Ramamurthy. (Admittedly, they are not followed in Minibase tothe extent they should be.) <OL><LI> Classes are named with a mixture of capitals and small letters.. start with a capital and do not contain any '_' or '-'. If class name is a concatenation of 2 words, the second word begins with a capital letter as well.<P> For example:<PRE> class RecoveryManager{ };</PRE><LI> First declare public methods, then public variables. Later, private methods and then private variables. <P> Public methods and variables :: same rules as naming classes ::<P> For example:<PRE> Status AddEntry(lsn_t lsn, int xid); lsn_t RecLSN;</PRE><P> Private variables/methods :: no capitals at all. All variables and methods start with an underscore.<P> For example :<PRE> int _pgid_array[100]; Status _restart_undo(RecXactTbl* xact_tbl);</PRE><LI> All global variables to begin with <CODE>minibase_</CODE> ( Basically the system name). The variable itself can begin with small letters.<PRE> minibase_bufmgr ==> Global buffer manager variable.</PRE><LI> All global functions begin with <CODE>minibase_</CODE><P> Let the function name ( after <CODE>minibase_</CODE>) begin with capitals and break multi words with underscores.<PRE> example :: minibase_Print_Routine();</PRE><LI> All macro definitions begin with <CODE>MINIBASE_</CODE> whatever..<LI> All filenames in lower case..</OL></BODY></HEAD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -