V2EX  ›  英汉词典

Length Function

Definition / 定义

“length function”常指长度函数:用于返回某个对象(如字符串、数组、列表、向量等)长度/元素个数的函数(多见于编程与数学语境)。在不同语言或领域中,具体名称可能是 lengthlensize 等。

Pronunciation / 发音

/leŋθ ˈfʌŋkʃən/

Examples / 例句

The length function returns the number of characters in this string.
长度函数会返回这个字符串中的字符数。

In the report, we used a length function to validate input and prevent buffer overflow errors.
在报告中,我们使用长度函数来校验输入并防止缓冲区溢出错误。

Etymology / 词源

“length”源自古英语 lengþu(表示“长度、长短”),与“long(长的)”同源;“function”来自拉丁语 functio(“履行、执行”),后来在数学与计算机领域中发展为“函数/功能”的含义。合起来,“length function”字面即“用于给出长度的函数”。

Related Words / 相关词

Literary Works / 文学作品

  • The C Programming Language(Kernighan & Ritchie):讨论字符串与数组长度相关的函数与处理方式。
  • Structure and Interpretation of Computer Programs(Abelson & Sussman):在示例中频繁使用与序列长度相关的过程/函数思想。
  • Introduction to Algorithms(Cormen 等):在算法分析与数据结构章节中涉及集合大小/长度等相关概念与函数表达。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1844 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 16ms · UTC 11:39 · PVG 19:39 · LAX 03:39 · JFK 06:39
♥ Do have faith in what you're doing.