digitalmars.D.bugs - Class comparison problems
First of all, I'm not an English speaker. So be tolerant of my poor English. I'm using Win32 compiler v0.135. I wrote the following code and had some problems: int main() { Object c = new Object; Object d = null; if (null == c) {} // Access Violation if (c == null) {} // Ok if (d == c) {} // Access Violation if (c == d) {} // Ok bit b; b = (1 == 2); // Ok b = (c == d); // Compile Error(cannot convert int to bit) return 0; } I'm sorry if these are known issues...
Oct 10 2005
In article <dieq96$187c$1 digitaldaemon.com>, Niboshi says...First of all, I'm not an English speaker. So be tolerant of my poor English. I'm using Win32 compiler v0.135. I wrote the following code and had some problems: int main() { Object c = new Object; Object d = null; if (null == c) {} // Access Violation if (c == null) {} // Ok if (d == c) {} // Access Violation if (c == d) {} // OkAll of these should use the "is" operator.bit b; b = (1 == 2); // Ok b = (c == d); // Compile Error(cannot convert int to bit) return 0; } I'm sorry if these are known issues...Your English is better than some of the postings from English speakers (my self included).
Oct 10 2005
In article <dif1c1$5cm$1 digitaldaemon.com>, BCS says...In article <dieq96$187c$1 digitaldaemon.com>, Niboshi says...Thanks a lot! I should have read documentation more carefully before posting :)First of all, I'm not an English speaker. So be tolerant of my poor English. I'm using Win32 compiler v0.135. I wrote the following code and had some problems: int main() { Object c = new Object; Object d = null; if (null == c) {} // Access Violation if (c == null) {} // Ok if (d == c) {} // Access Violation if (c == d) {} // OkAll of these should use the "is" operator.bit b; b = (1 == 2); // Ok b = (c == d); // Compile Error(cannot convert int to bit) return 0; } I'm sorry if these are known issues...Your English is better than some of the postings from English speakers (my self included).
Oct 11 2005