digitalmars.D - inout and variadic functions
- Tyro (6/6) Dec 20 2004 Is there anything fundamentally wrong with a variadic function parameter...
- Russ Lewis (4/8) Dec 20 2004 This might be an interesting way to implement a scanf alternative.
- Tyro (3/11) Dec 20 2004 This is precisely my reason for asking! Though out is better for scanf()...
- Simon Buchan (22/29) Dec 21 2004 I would rather have a little more contol in general on these functions, ...
Is there anything fundamentally wrong with a variadic function parameters being defined as such: void foo(inout ...){} If so, please explain why. Otherwise please add this feature. Thanks, Andrew
Dec 20 2004
Tyro wrote:Is there anything fundamentally wrong with a variadic function parameters being defined as such: void foo(inout ...){}This might be an interesting way to implement a scanf alternative. Although with something like scanf, 'out' might make more sense than 'inout'.
Dec 20 2004
In article <cq777v$nmp$1 digitaldaemon.com>, Russ Lewis says...Tyro wrote:This is precisely my reason for asking! Though out is better for scanf(), I think both out and inout should be authorized for use in this manner.Is there anything fundamentally wrong with a variadic function parameters being defined as such: void foo(inout ...){}This might be an interesting way to implement a scanf alternative. Although with something like scanf, 'out' might make more sense than 'inout'.
Dec 20 2004
On Mon, 20 Dec 2004 18:28:58 +0000 (UTC), Tyro <Tyro_member pathlink.com> wrote:Is there anything fundamentally wrong with a variadic function parameters being defined as such: void foo(inout ...){} If so, please explain why. Otherwise please add this feature. Thanks, AndrewI would rather have a little more contol in general on these functions, things like foo(bar ree, out uint outArgs..., in uint inArgs...) {} would be nice, (although I can't think of an explicit exapmle where you want this checked at compile-time) but I wonder what the syntax would be like? inArgs.ptr? outArgs[4].typeid? Could be interesting to discuss, at least. -- "Unhappy Microsoft customers have a funny way of becoming Linux, Salesforce.com and Oracle customers." - www.microsoft-watch.com: "The Year in Review: Microsoft Opens Up" -- "I plan on at least one critical patch every month, and I haven't been disappointed." - Adam Hansen, manager of security at Sonnenschein Nath & Rosenthal LLP (Quote from http://www.eweek.com/article2/0,1759,1736104,00.asp) -- "It's been a challenge to "reteach or retrain" Web users to pay for content, said Pizey" -Wired website: "The Incredible Shrinking Comic"
Dec 21 2004