Re: Current test version of Chess 0.5



I Forget <No@xxxxxxxxxxx> wrote:

> <frank@xxxxxxxx>
>
>>> Maybe it's time for a new standard. One that's actually updated for
>>> the real world...[sigh]
>>
>> It's called ISO 10206 and was released in 1990. D'oh!
>
> That only does some stuff.
>
> Other, such as the REAL problem is still very much present.

And which other dialect of Pascal does this? Sure, the Borland
manuals describe the layout of real types in detail. But their
compilers are implemented only on one CPU, so for the most part they
only had to copy the hardware description (except for their
self-made 6 byte type, which today is much less efficient and
therefore probably hardly used anymore except for historical
reasons).

Do you think if Borland were to port their compilers to another CPU
with different FP hardware, they'd emulate the IA32 types? I doubt
it, actually I'd hope not -- for performance this would probably be
quite a stupid thing to do.

Likewise, you can pick any other compiler (ISO or not) on a given
platform, verify that its FP sizes match your requirements, and
pretend this compiler guaranteed the FP range you need.

Fortunately, most FP hardware these days is IEEE compatible. But
this applies to any language dialect. When running on an IEEE
platform, you won't have much problems, when not, then good luck,
with any dialect.

Or what do you think would happen if the standards prescribed a
minimum size?

a) The size would be conservative enough so every wide-spread
platform supports it directly. Every implementor would verify
that it does and go ahead. You get the same effect now by
checking the size at program start (as has been described here).

b) The size would be a serious obstacle. I suppose few implementors
would bother to write an expensive and inefficient emulation.
Rather, they'd either omit this part of the standard or simply
avoid supporting platforms that don't support the size naturally,
possibly by a check a program start-time. Again, you can achieve
the same that by a self-made check. Actually, the latter is
preferable, since you can check for exactly the size you need,
rather than some arbitrary choice put in a standard.

Frank

--
Frank Heckenbach, frank@xxxxxxxx, http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)
Pascal code, BP CRT bugfix: http://fjf.gnu.de/programs.html
Free GNU Pascal Compiler: http://www.gnu-pascal.de/
.



Relevant Pages

  • Re: interesting use of NEXT SENTENCE vs. CONTINUE
    ... These days I don't do compiler maintenance, but I HAVE done in the past, so ... You had a chance to point out how adherence to the standard can improve ... >> compile it WITH MINOR MODIFICATIONS for a specific platform. ... > platform-specific extension to COBOL ...
    (comp.lang.cobol)
  • Re: C portability is a myth
    ... > solicitation for the availability of a compiler for a given platform. ... If the source is pure Standard C ... can be successfully ported to all implementations. ...
    (comp.lang.c)
  • Re: interesting use of NEXT SENTENCE vs. CONTINUE
    ... I DID think any old compiler would be able to ... > compile it WITH MINOR MODIFICATIONS for a specific platform. ... > not going to go to the Standard to see what SHOULD work. ... If you write your COBOL code avoiding the things that are marked as ...
    (comp.lang.cobol)
  • Re: interesting use of NEXT SENTENCE vs. CONTINUE
    ... > implementations that purport to conform to a COBOL standard is to write ... I DID think any old compiler would be able to ... compile it WITH MINOR MODIFICATIONS for a specific platform. ... >> Portability depends on where you plan to port (or more likely where ...
    (comp.lang.cobol)
  • Re: <ctype.h> toLower()
    ... I need to link in the standard C library. ... The output of a compiler is generally called an object file. ... a call to tolower() is a call to tolower, ... platform, without even having to know which character set is used on that ...
    (alt.comp.lang.learn.c-cpp)