D - printf_assert
- Matthew (2/2) Mar 14 2004 We could really do with a printf_assert(), in order to print out details...
- Piotr Fusik (4/6) Mar 14 2004 I'd prefer:
- J C Calvarese (10/19) Mar 14 2004 I'd prefer:
- Matthew (7/21) Mar 14 2004 of
- J Anderson (6/12) Mar 14 2004 Me too. It's just common sense that assert with printf functionality
We could really do with a printf_assert(), in order to print out details of asserts and assert in a single statement
Mar 14 2004
We could really do with a printf_assert(), in order to print out details of asserts and assert in a single statementI'd prefer: assert foo == bar, "foo=$foo bar=$bar"; or (Java-like): assert foo == bar : "foo " ~ foo ~ " bar=" ~ bar;
Mar 14 2004
Piotr Fusik wrote:I'd prefer: assert(x==1, "x: %d", x); assert(testExpression, formattingString, ...); (I like the parentheses on assert.) I think adding optional output options on assert would be great. I think I'd use it often. -- Justin http://jcc_7.tripod.com/d/We could really do with a printf_assert(), in order to print out details of asserts and assert in a single statementI'd prefer: assert foo == bar, "foo=$foo bar=$bar"; or (Java-like): assert foo == bar : "foo " ~ foo ~ " bar=" ~ bar;
Mar 14 2004
"J C Calvarese" <jcc7 cox.net> wrote in message news:c31vsi$vo6$1 digitaldaemon.com...Piotr Fusik wrote:ofWe could really do with a printf_assert(), in order to print out detailsThat's a good suggestion. I've spent heaps of time putting printf stuff in and around invariants this w/e, as I've been working on DTL containers. Lists were especially assertive ... ;)I'd prefer: assert(x==1, "x: %d", x); assert(testExpression, formattingString, ...);asserts and assert in a single statementI'd prefer: assert foo == bar, "foo=$foo bar=$bar"; or (Java-like): assert foo == bar : "foo " ~ foo ~ " bar=" ~ bar;(I like the parentheses on assert.)Indeed.
Mar 14 2004
J C Calvarese wrote:I'd prefer: assert(x==1, "x: %d", x); assert(testExpression, formattingString, ...); (I like the parentheses on assert.) I think adding optional output options on assert would be great. I think I'd use it often.Me too. It's just common sense that assert with printf functionality would look like this. C/C++ programmers will instantly know how to use this. -- -Anderson: http://badmama.com.au/~anderson/
Mar 14 2004