This is a discussion that seems to pop up ever 1-2 yrs. Kind of funny really. The conclusion is always that sscanf is "incorrect" or "invalid" but too useful to remove.
/ David Hedbor
Previous text:
2003-12-23 19:30: Subject: Re: C#-like properties
On Tue, Dec 23, 2003 at 06:11:33PM +0100, Martin Baehr wrote:
i understand mirars example, but it barely hints at how it relates to yours,
It fits perfectly, since after:
n = sscanf("%d %d %s", x, y, z);
I can do something like:
if (n > 2 && x > 100) foo(z); while in case of array_sscanf() I've to reassing array's values to variables
- using array directly will degrade code readability - symbolic are
better, and again - performance because of array allocations (and extra copying).
Case of default values also significant. To be short - sscanf() simplifies the code and damn convenient, comparing to other methods.
Regards, /Al
/ Brevbäraren