Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!munnari!vuwcomp!windy!srwmrbd From: srwmrbd@windy.dsir.govt.nz (ROBERT) Newsgroups: comp.lang.c++ Subject: Zortech bugs Message-ID: <2118@windy.dsir.govt.nz> Date: 1 Feb 89 16:01:38 GMT Organization: DSIR, Wellington, NZ Lines: 129 This is a list of examples of things we have found that don't work in Zortech C++ (1.07) but do work in Advantage/Designer C++ 1.2 (beta-2) on a PC. Automatic conversions (p174-5) - Compiler returns a bug message (11157) when a conversion is required if the conversion is explicitly requested, a syntax error if it is not. #include class APPLES { int napples; public: APPLES() { } APPLES(int n) { napples=n; } operator int() { return napples; } }; class ORANGES { int noranges; public: ORANGES(int n) { noranges=n; } operator APPLES() { return APPLES(2*noranges); } }; main() { APPLES a; ORANGES o=7; a=(APPLES)o; // bug 11157 generated by this line // a=o; // syntax error generated by this line cout << (int)a; } A further conversion(?) problem: #include class A { int data; public: A(int i) { data=i; } friend ostream& operator<<( ostream&, A& ); operator int() { return (int)data; } }; ostream& operator<<(ostream& o, A& a) { o< class V { public: V(char *); friend ostream& operator<<(ostream&, V&); }; class M : public V { public: M(char *); friend ostream& operator<<(ostream&, M&); }; main() { cout << "test"; // syntax error on this line } A variety of errors when an 8087 is used with float. There is no problem if one replaces float by double or disables the 8087. #include float square(float x) { return x*x; } main() { extern int _8087; if (_8087) _control87(0x300,0x300); cout << "8087 code = " << _8087 << "\n"; // _8087 = 0; float x0=0.00000000000000000000000000000000000001; cout << x0 <<" "<< x0*x0 <<" "<< square(x0) <<"\n"; float x1=0.0000000000000000001; cout << x1 <<" "<< x1*x1 <<" "<< square(x1) <<"\n"; float x2=0.0; cout << x2 <<" "<< x2*x2 <<" "<< square(x2) <<"\n"; float x3=0.00001; cout << x3 <<" "<< x3*x3 <<" "<< square(x3) <<"\n"; } Help file problem I have all the Zortech files on drive D but carry out development on drive C. I am unable to access online help from drive C. Notes: Zortech C++ compiles about 3 times faster than Glockenspiel + MSC 5.1 on my test program and will also handle bigger projects. Speed and codefile size seem similar if you use the -f flag for Zortech. So, at least at the development stage of a project on a PC, it is much nicer to use Zortech than Glockenspiel but it is also frustrating not knowing whether an error is one's own or Zortech's. Robert Davies