[fpc-pascal] Re: Why this evaluates on "if" wrong ?
Daniël Mantione
daniel.mantione at freepascal.org
Mon Oct 29 22:23:09 CET 2007
Op Mon, 29 Oct 2007, schreef L:
> > Same as ansistring.. it can be dangerous to hide all the intricate details of
> a
> > pchar/bytearray, which is what ansistring does. But ansistrings are really
> > useful for 'every day' use.
>
> > > Wrong. A string can be represented "alphadequate", as it is called; an
> > > ansistring can handle any string you can imagine supposed there is enough
> > > memory available.
>
> http://www.google.ca/search?q=alphadequate
Noted. Perhaps the reason is it is written with an alpha sign in my books.
> > An adequate or alphadequate representation of a real number cannot exists.
> > Regardless what datastructure you use, there always exists a real number
> > that cannot be represented by it.
>
> A string with infinite characters cannot be represented.
> Therefore, there is always a string that cannot be represented.
This is the difference between adequate and alphadequate.
Alphadequate="supposed there is enough memory available". Supposed you
have enough memory, you can store any string.
On the other hand a Pascal boolean is adequate for storing a
mathematical boolean, regardless how much memory you have.
And, as said before, no datastructure is adequate for storing a
mathematical real number. Not even if you have infinite memory.
Daniël
More information about the fpc-pascal
mailing list