What is a “routine”? A routine is an individual method or procedure invocable for a single purpose. Examples include a function in C++, a method in Java,a function or sub procedure in Microsoft Visual Basic. For some uses, macros in C andC++ can also be thought of as routines. You can apply many of the techniques for creatinga high-quality routine to these variants.
in computing, software code that reacts to an event or specializes in a type of data:
* Handler, an asynchronous callback subroutine in computing
* Handler, a particular class of service process in DNIX
* A20 handler, the IBM PC memory manager software controlling access to the High Memory Area
* event handler
* interrupt handler
* signal handler作者: 宇宙飛船 時(shí)間: 2009-9-19 16:42
//--program---routine---subroutine---handler---process---function--code--source
怎么區(qū)分?
基于IT編程中的應(yīng)用,俺的理解是:
program(程序)---routine(例行程序)---subroutine(子程序)---handler(句柄)---process(進(jìn)程)---function(函數(shù))--code(代碼)--source(源代碼)
program 泛指一般的程序,包含所有的程序。
routine 通常是指在PDF 文檔中給出的例程。
subroutine 被主程序調(diào)用的子程序。
handler 微軟的DOS系統(tǒng)中加載到內(nèi)存中的程序名,以此來(lái)識(shí)別內(nèi)存中的各個(gè)程序的首地址。
process 操作系統(tǒng)加載用戶應(yīng)用程序時(shí),在內(nèi)存中的名字標(biāo)記,調(diào)用一個(gè)進(jìn)程相當(dāng)于執(zhí)行了一個(gè)任務(wù)。
function 相當(dāng)于匯編中調(diào)用call的子程序,在源碼中的子程序才能叫做函數(shù)。不能被OS直接調(diào)用。
code 指所有編碼方面的,包括硬件中(例如,RS232 的碼率是多少) 和軟碼中的編寫的程序代碼。
source 特別是指軟件中的源程序編碼。
-----------------
以上如有錯(cuò)誤之處,請(qǐng)斧正!