|
Boost : |
From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2000-11-16 15:44:44
> My feeling has always been that a compact, machine-independent,
> variable-length number representation (e.g. high bit set indicates the end
> of the number) was the way to go if you care about portability at all. The
> length of an int/long/char/short/wchar_t/float/double... on any given
> machine is too variable to make this work otherwise. It's also nice
> because
> you can detect overflows.
>
This all depends on what you mean by "portablity", do you mean seamless data
interchange? Or that two dissimilar machine architectures given the same
inputs will generate the same outputs? Military hardware is often redundant
this way, different CPU manufacturers, then the resulting machines vote to
see which output to use.
My current need is data interchange, although in a past life I would have
needed the later. Although I can neither confirm nor deny that need. :>
-gary-
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk