什么是处理程序? [英] What is a handler?
问题描述
我正在尝试学习一些与编程相关的术语,经常会遇到处理程序"这个词.谁能解释一下它的含义以及何时使用它?
I am trying to learn some programming related terms, and I often come over the word "handler". Can anyone please explain what it means and when to use it?
推荐答案
处理程序是一种例程/函数/方法,专门处理某种类型的数据或专注于某些特殊任务.
A handler is a routine/function/method which is specialized in a certain type of data or focused on certain special tasks.
示例:
事件处理程序 - 接收和消化来自周围系统(例如 OS 或 GUI).
Event handler - Receives and digests events and signals from the surrounding system (e.g. OS or GUI).
内存处理程序 - 在内存上执行某些特殊任务.
Memory handler - Performs certain special tasks on memory.
文件输入处理程序 - 接收文件输入并执行的函数数据上的特殊任务,当然这一切都取决于上下文.
File input handler - A function receiving file input and performing special tasks on the data, all depending on context of course.
这篇关于什么是处理程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!