home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.msdos.programmer:10385 comp.msdos.programmer:85 comp.os.ms-windows.programmer.tools:1352
- Newsgroups: comp.os.msdos.programmer,comp.msdos.programmer,comp.os.ms-windows.programmer.tools
- Path: sparky!uunet!rei2!fox
- From: fox@rei.com (Fuzzy Fox)
- Subject: Re: BC++ far* default in medium model
- Message-ID: <1992Nov6.171236.1394@rei.com>
- Date: Fri, 6 Nov 1992 17:12:36 GMT
- References: <1992Nov4.090359.21666@hellgate.utah.edu> <1992Nov5.031544.5264@sequent.com> <1992Nov5.053551.20533@emr1.emr.ca> <1992Nov5.084656.10427@sequent.com>
- Organization: Recognition Equipment, Inc.
- Lines: 31
-
- >>>In your data declarations, if you do not specifically specify the
- >>>keyword far, then the declaration is left in the default data
- >>>segment, which can be a problem if you have more than 64k of global
- >>>data.
-
- This is true except in BC++ 3.1, where an option can be set which forces
- all data declarations larger than a certain threshold to be
- automatically moved into another segment. The option is -Ff=nnnn, I
- believe. I use -Ff=1024 in all my programs. In the IDE, this option is
- set as the "Automatic Far Data" option and threshold.
-
- >If you want to have arrays or structures that explicity
- >store > 64k of data in one instance then you have to use the HUGE
- >model,
-
- You do not have to use huge model, you just need to use the 'huge'
- keyword when declaring the data item. In fact, a common misconception
- is that the Huge model forces all pointers to be huge by default. This
- is not true. Huge model is just like Large model, except that each
- individual source file gets its own data segment automatically. A
- single source file program will compile exactly the same under Huge and
- Large models.
-
- Huge pointers are frought with problems, and you need to know what
- you're doing in order to use them properly.
-
- --
- #ifdef TRUE | Fuzzy Fox (a.k.a. David DeSimone) fuzzy@netcom.com
- #define TRUE 0 |
- #define FALSE 1 | "History doesn't repeat itself, but it rhymes."
- #endif | -- Mark Twain
-