comp.lang.ada
 help / color / mirror / Atom feed
* data types & efficiency
@ 2004-03-05  8:02 Davide
  2004-03-05  9:23 ` Vinzent 'Gadget' Hoefler
  2004-03-05 10:22 ` Jean-Pierre Rosen
  0 siblings, 2 replies; 11+ messages in thread
From: Davide @ 2004-03-05  8:02 UTC (permalink / raw)


hello everybody,

speaking in general, if I have a *XX-bit* architecture for which I'm
developing software in Ada, and I need to declare some *scalar* (not records
nor arrays etc.) variable eg. integer: what should be better to do:

1) always declare that variable as the *smallest* data type that will hold
the highest value of its possible range (example: if it can assume values
from 0 to 150 then declare it as an 8-bit integer);

2) tend to declare the variable as the machine "native" data type,  i.e.
XX-bit represented.

I think considerations should be made about efficiency and memory occupation
*but* (maybe) taking into account memory alignment (that could vanify
considerations made at point 1...maybe).

Waiting for your opinions,

thanks in advance.






^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-03-08 15:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-05  8:02 data types & efficiency Davide
2004-03-05  9:23 ` Vinzent 'Gadget' Hoefler
2004-03-05  9:57   ` Davide
2004-03-05 12:00     ` Vinzent 'Gadget' Hoefler
2004-03-05 15:54       ` Davide
2004-03-05 20:53         ` tmoran
2004-03-08  9:28           ` Davide
2004-03-08  8:58         ` Vinzent 'Gadget' Hoefler
2004-03-08 10:53           ` Davide
2004-03-08 15:27           ` Robert I. Eachus
2004-03-05 10:22 ` Jean-Pierre Rosen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox