"cdecl"是什么意思?代表? [英] What does "cdecl" stand for?

查看:134
本文介绍了"cdecl"是什么意思?代表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是的,我知道"cdecl"是重要的调用约定的名称,所以请不要向我解释调用约定.我要问的是缩写(?)"cdecl"实际上代表什么.我认为这是一个糟糕的命名选择,因为乍一看它使人想起"C声明符"(C的一个非常独特的语法方面).实际上,有一个名为 cdecl 的程序,其唯一目的是解密C声明符.但据我所知,C声明符语法与调用约定完全无关.

Yes, I know that "cdecl" is the name of a prominent calling convention, so please don't explain calling conventions to me. What I'm asking is what the abbreviation (?) "cdecl" actually stands for. I think it's a poor naming choice, because at first sight it reminds one of "C declarator" (a rather unique syntactic aspect of C). In fact, there is a program called cdecl whose sole purpose is to decipher C declarators. But the C declarator syntax has absolutely nothing to do with calling conventions as far as I can tell.

简化版本:"stdcall"代表标准调用约定"."cdecl"代表什么?

Simplified version: "stdcall" stands for "standard calling convention". What does "cdecl" stand for?

推荐答案

您对此有过多的了解.它代表通常调用C函数的实现的调用约定(但对于varargs尤其重要).

You're reading too much into this. It stands for the calling convention of the implementation for calling C functions in general (but especially important with varargs).

它不一定是组合了"C"和声明"的缩写.名称只是名称,特别是在编程中.助记符有帮助,但是即使"malloc"表示分配内存",它也具有我们知道并附加的其他含义;例如,"alloca"还分配内存".

It doesn't have to be an abbreviation for something that combines "C" and "declaration"; names are just names, especially in programming. Mnemonics help, but even though "malloc" means "allocate memory", it has additional meaning that we know and attach to it; "alloca" also "allocates memory", for example.

或者采用结构",它意味着"一个结构",但是结构"本身是如此通用,以至于没有我们在潜意识中依附于结构"的含义,我们将无可救药地迷失了,因为新程序员仍在学习术语经常迷路.

Or take "struct" which "means" a "structure", but "structure" is so generic by itself that without the meaning we attach subconsciously to "struct" we would be hopelessly lost – as new programmers still learning the terminology are often lost.

这篇关于"cdecl"是什么意思?代表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆