sprintf风格的字符串格式的起源 [英] The origin of sprintf-style string formatting

查看:195
本文介绍了sprintf风格的字符串格式的起源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sprintf 中的字符串格式化概念现在几乎可以在任何语言中找到<您知道,扼杀了%s%d%f等字符串并提供了一个变量列表填补他们的地方)。

哪个语言库最初有一个库函数或语言结构提供了这个功能?

请注明某种来源参考,以确认您的申诉,以避免纯粹的猜测或猜测。



问候



Robert

解决方案

维基百科有一个相当完整的历史。它表明C printf函数起源于BCPL的writef函数。

The string formatting concept found in sprintf can be found in almost any language today (you know, smothering a string with %s %d %f etc. and providing a list of variables to fill their places).

Which langugage was it originally that had a library function or language construct which offered this functionality?

Please specify some kind of source reference to confirm your claim, so that we avoid pure speculation or guessing.

Regards

Robert

解决方案

Wikipedia has a pretty thorough history. It suggests that the C printf function had its origins in BCPL's writef function.

这篇关于sprintf风格的字符串格式的起源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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