Message-ID: <38A79F1F.50418D9F@home.com> From: Robin Johnson Organization: Orbit Computers X-Mailer: Mozilla 4.5 [en]C-AtHome0405 (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: 256 variable holder... Quick Question! References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 38 Date: Mon, 14 Feb 2000 06:22:12 GMT NNTP-Posting-Host: 24.113.36.103 X-Complaints-To: abuse AT home DOT net X-Trace: news1.rdc1.bc.home.com 950509332 24.113.36.103 (Sun, 13 Feb 2000 22:22:12 PST) NNTP-Posting-Date: Sun, 13 Feb 2000 22:22:12 PST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Bryan Edds wrote: > Okay, I need a variable that stores no more than 256. I used to use this to > hold a number anywhere from 0 to 255; > unsigned __int8 varname; You seem to be a MSVC user... Why not use some code that is more ANSI friendly, something mirco$ucks doesn't know about.... unsigned char varname; > > varname = 255; > It worked well and was very fast. But, this does not work in DJGPP. The > smallest type I can use is a SHORT INT which is too slow for a graphics short int is the same as short, and btw using 32bpp with int these days is much faster on the current good gfx cards > display, and a waste since I only use 256 colors. I need something like > __INT8 to store numbers, but now it's gone. Any explanation is welcome, but > if it gets complicated, please be thorough. I just now broke into the DJGPP > scene. -- Robin Hugh Johnson "Robbat2" QTOD: "I used to be an idealist, but I got mugged by reality." E-Mail : robbat2 AT t-p-l DOT com ICQ# : 30269588 or 41961639 Home Page : http://tesla.t-p-l.com Time Zone : Pacific Daylight (GMT - 8)