Portability across architectures..

Johnnie Peters jsp at marvin.UUCP
Fri Sep 23 12:39:23 AEST 1988


In article <4940003 at hpiacla.HP.COM!, scottg at hpiacla.HP.COM (Scott Gulland) writes:
! / hpiacla:comp.lang.c / dhesi at bsu-cs.UUCP (Rahul Dhesi) /  8:43 pm  Sep 13, 1988 /
!!! In article <7038 at bloom-beacon.MIT.EDU> scs at adam.pika.mit.edu (Steve Summit)
!!!writes:
!!![numerous arguments in favor of using ASCII text for portability]
! 
!! Counterarguments:
!! 
!! 1.   ASCII text is likely to be very bulky.
! 
! True, ASCII text may be very bulky, but isn't this just an efficiency issue.
! When portability to many machine architectures is truly needed, most people
! will gladly sacrifice efficiency for ease of portability in their data files.
!! 2.   All modern hardware architectures can use 8-bit bytes, so ASCII
! I'm sorry, but I don't understand how this statement relates to portability
!! I suggest encoding the data in bytes using a known byte order.
! 
! Bad idea !  Many architectures use different byte orderings for integers
! , reals, etc.  This also does not seem to address differences between
! 

	Why not take the road that many databases do?  Write 2 utilites, one 
to export the data in ascii form and one to import it back in.  This would
allow data to taken across machines and still be used in their native format.
Also this allows backups that will be more portable.

				--  Johnnie  --



More information about the Comp.lang.c mailing list