Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!emory!hubcap!grimlok From: grimlok@hubcap.clemson.edu (Mike Percy) Newsgroups: comp.lang.c++ Subject: Re: Borland C++ memory allocation questions Message-ID: <11681@hubcap.clemson.edu> Date: 16 Nov 90 22:38:05 GMT References: <60903@bbn.BBN.COM> <11679@hubcap.clemson.edu> Organization: Clemson University, Clemson, SC Lines: 22 grimlok@hubcap.clemson.edu (Mike Percy) writes: Sorry about that previous post. I made some un-true statements. My explanations hold true under TC++ in the C mode, but apparently in C++ mode, sizeof works a little differently, as does array declarations (can declare bigger arrays in C++ than in C). Apparently sizeof returns unsigned long when it is used in a binary operation with a long. It returns unsigned int otherwise. I've just gotten so used to the TC++ C mode, that my knee jerked when I saw these (so often seen complained about in C mode). To the original poster: The Borland documentation is obviously (was there ever any doubt?) not perfect. I figured this stuff out with the -S (generate assmbly listing), if you understand the Intel architecture, you'll be able to spot the problems. "I don't know about your brain, but mine is really...bossy." Mike Percy grimlok@hubcap.clemson.edu ISD, Clemson University mspercy@clemson.BITNET (803)656-3780 mspercy@clemson.clemson.edu