assert(condition[, message]) patch

BCS BCS_member at pathlink.com
Tue May 30 21:21:41 PDT 2006


In article <e5im92$hlo$2 at digitaldaemon.com>, akcom says...
>
[...]
>Just my thoughts, I think it's definitely got some merits, although one 
>must consider that the assert( statementToTest ) would give you the line 
>that threw the assert, which makes a message a bit less important. 

if the message is non static then a lot of info can be printed.

assert(str.length < 5, `the string "` ~ str ~ `" is more than 5 char long");

I'll vote for this.





More information about the Digitalmars-d mailing list