reading legacy floppy disks

ron ronjscott-rieW9WUcm8FFJ04o6PK0Fg at public.gmane.org
Sat Sep 9 01:26:12 UTC 2006


James Knott wrote:

> Mel Wilson wrote:
>
>> Lennart Sorensen wrote:
>>
>>> On Thu, Sep 07, 2006 at 07:27:42AM -0400, James Knott wrote:
>>>
>>>> When I took C at George Brown College in 1995, we could use 3.5"
>>>> floppies.  However, in class we used Turbo C on Windows 3.1, while at
>>>> home I used Borland C on OS/2, so I had to be careful about variable
>>>> sizes.  For example an int was 16 bits in Borland C, but only 8 in
>>>> Turbo.  On occasion, my code would work fine at home, but crap out in
>>>> class because I'd overflowed a variable.
>>>
>>>
>>> Don't 8 bit integers violate the C standard?  I thought it required
>>> integer to be at least 16 bits.
>>
>>
>> This recollection is rather strange.  I'd been using Turbo C
>> since 1986 or so, and remember only 16-bit ints.  My version ran
>> on a PC clone with 8088, so 16-bits was a normal size.
>> In 1995 Turbo C 2.0 was my preferred small language, for writing
>> little one-off utilities and the like.  No hint of anything so
>> non-standard.
>
>
> In retrospect, I could be wrong on that, as it was 11 year ago. 
> Regardless, the integer in Borland C on OS/2 was twice as wide as on 
> DOS Turbo C, so it may have been 32 vs 16 bits.  I haven't looked at 
> either compiler in years.
>
In the "Turbo C  User's Guide" by Borland International Inc., First 
Printing 1987, on page 94 in the paragraph titled "The Three ints" the 
last sentance is: "In Turbo C, these types occupy16 bits (short), 16 
bits (int), and 32 bits (long)."
There is half the answer.

Ron


--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wini/Mailing_lists





More information about the Legacy mailing list