gpt4 book ai didi

history - 可变参数函数的起源是什么?

转载 作者:行者123 更新时间:2023-12-02 13:51:32 26 4
gpt4 key购买 nike

Variadic functions源自特定语言、数学、科学文章......?有什么想法吗?

最佳答案

There are many mathematical and logical operations that come across naturally as variadic functions. For instance, the summing of numbers or the concatenation of strings or other sequences are operations that can logically apply to any number of operands.

尽管“可变参数函数”这个标签听起来很现代,但它的概念可能和轮子一样古老。好吧,也许没那么多,但它的演变是如此合乎逻辑,以至于它可能在此过程中被多次重新发现。

Watcom编译器may have been the first为 C 语言实现它:

Variadic functions fall back to the Watcom stack based calling convention.

The Watcom C/C++ compiler is a compiler for the computer programming languages C and C++ that produces executable programs for several platforms and operating systems. The code it produces for MS-DOS executes very fast. It was one of the first compilers to support the Intel 80386 "protected mode". In the mid-1990s some of the most technically ambitious DOS games such as Doom, Descent and Duke Nukem 3D were built using Watcom C. Though no longer sold commercially by Sybase, the Watcom C/C++ compiler and the Watcom Fortran compiler have been made available as the free and open source Open Watcom package with the assistance of SciTech Software

也就是说,我认为这个问题更适合 math.stackexchange.com .

关于history - 可变参数函数的起源是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8065713/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com