Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!uunet!math.fu-berlin.de!fauern!forwiss.uni-passau.de!fraus From: fraus@forwiss.uni-passau.de (Uli Fraus) Newsgroups: comp.windows.interviews Subject: a problem with "inch" Message-ID: <1991Jun3.151557.10753@forwiss.uni-passau.de> Date: 3 Jun 91 15:15:57 GMT Sender: usenet@forwiss.uni-passau.de (USENET News System) Organization: University of Passau, Germany Lines: 39 Nntp-Posting-Host: drogo.forwiss.uni-passau.de Hello everybody, I am trying to learn InterViews (we have IV 2.6 with g++ under SunOS 4.1.) and now have the following problem. According to the examples in publications I specified a global constant 'space' and failed. The constant always had the value 0. But when I write the same constant definition after defining a World variable the constant value is non zero! For example the following small program #include #include int main() { const double space1 = inch; World* world = new World(); const double space2 = inch; cout << inch <<" "<< space1<<" "<< space2 <<"\n"; return 0; } produces the output: 90 0 90 So maybe the variable inch (from file defs.h) is initialized by defining a World variable. Is this a bug or a feature??? How is it possible to have (global) constants based on 'inch'? Thanks for hints and information Uli. -- Ulrich Fraus, FORWISS Passau, University of Passau, West Germany ||==== E-Mail: fraus@forwiss.uni-passau.de || || || () ||__ Phone : +49 851/509-496 || || || || || Fax : +49 851/509-497 \\==// ||=== || || o