wxCHECK and semicolon required
Vadim Zeitlin
vadim at wxwindows.org
Tue Apr 3 04:40:54 PDT 2007
On Tue, 03 Apr 2007 13:33:48 +0200 H <H at h.com> wrote:
H> Is it really necessary that wxCHECK needs a semicolon?
Yes, it's a statement-like macro.
H> With the current implementation the following statements or similar ones
H> are impossible:
H>
H> if (!(String.IsEmpty()))
H> wxCHECK(String.ToULong(&Number),false);
H> else
H> Number = 0;
Sorry, but what does it have to do with the semicolon? AFAICS this is
rather due to wxCHECK not being a single statement. It would be nice to
avoid this but AFAIR we didn't find a way to make this work with all
supported compilers the last time it was discussed.
Anyhow, considering that there is a trivial workaround (just add braces) I
don't think it's a huge problem.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list