Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.society.futures Subject: Re: C's sins of commission (was: (pssst...fortran?)) Message-ID: <63644@lanl.gov> Date: 21 Sep 90 00:00:46 GMT References: <9009202104.AA21146@raven.pa.dec.com> Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 21 From article <9009202104.AA21146@raven.pa.dec.com>, by mwm@DECWRL.DEC.COM (Mike Meyer, My Watch Has Windows): > [...] |> You've as yet to answer my questions about garbage collection, and |> what constructs would be provided for working with sequences. As an |> addendum to that list, I'd be interested to know how you would recode |> the following C sequence with undefined behavior using your proposed |> constructs so that it would do what it's author intended: |> |> long word ; |> char *pointer ; |> |> word = '1234' ; |> pointer = (char *) word ; |> printf("%c %c %c %c\n", pointer++, pointer++, pointer++, pointer++) ; |> |> The intent was to determine the byte ordering of the machine the code was |> running on. Answered via email. I can post the answer here if there's any interest. J. Giles