V2EX  ›  英汉词典
Enqueued related words: Return Value

Return Code

Definition / 释义

return code(也常说 exit code/status code):在编程或命令行中,程序结束时返回给操作系统或调用者的状态数字,用来表示运行是否成功(通常 0 表示成功,非 0 表示不同类型的错误或异常)。

Pronunciation / 发音

/rɪˈtɜːn kəʊd/

Examples / 例句

Please check the return code after running the command.
运行命令后请检查返回码。

If the return code is nonzero, the deployment tool will stop and write an error message to the log.
如果返回码不是 0,部署工具会停止并把错误信息写入日志。

Etymology / 词源

return 源自古法语 retorner(“返回、回转”),code 源自拉丁语 codex(“法典、汇编”)。合在一起在计算机语境中引申为“程序返回的编码化状态值”,用于向外部报告执行结果。

Related Words / 相关词

Literary Works / 作品例证

  • The C Programming Language(Kernighan & Ritchie)——讨论程序返回状态与约定(如 main 的返回值)。
  • Advanced Programming in the UNIX Environment(Stevens & Rago)——大量涉及进程退出状态与相关系统调用。
  • The Linux Programming Interface(Michael Kerrisk)——讲解退出状态、错误处理与脚本/程序交互。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1840 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 09:30 · PVG 17:30 · LAX 01:30 · JFK 04:30
♥ Do have faith in what you're doing.