Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About Union and it's uses in FB
#6
The thing is useful, among other things, and as mentioned, to save memory. It is used for example in the structure which is used to give attributes to a grammar using flex/bison, when symbols can have information attached. As this information can be of different types, you could have used a normal type structure, but that wastes memory as only one field would be used. Using a union, you get the same functionality but you take only the memory which is needed to store the biggest element.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Messages In This Thread
About Union and it's uses in FB - by no.d - 03-04-2005, 11:05 AM
About Union and it's uses in FB - by Joakim - 03-04-2005, 03:47 PM
About Union and it's uses in FB - by Aquarius - 03-04-2005, 04:24 PM
About Union and it's uses in FB - by VonGodric - 03-04-2005, 05:09 PM
Thanks guys - by no.d - 03-04-2005, 07:51 PM
About Union and it's uses in FB - by na_th_an - 03-04-2005, 08:12 PM
About Union and it's uses in FB - by no.d - 03-04-2005, 08:28 PM
About Union and it's uses in FB - by Joakim - 03-04-2005, 10:28 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)