• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: File format conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File format conversion


  • Subject: Re: File format conversion
  • From: Richard Dobson <email@hidden>
  • Date: Thu, 05 Feb 2009 10:27:58 +0000

Brian Willoughby wrote:
Fredrik, the comma operator will compile, but it won't work. The C language allows you to combine any number of expressions on a single line using commas, but those expressions are not related to each other in any way. Your code is assigning Big Endian, but dropping the Signed Integer and Packed flags.

I bet that if you turned on compiler warnings, it would tell you that you have orphaned expressions which are doing nothing.


Er, not quite - the value of a comma expression is that of the rightmost subexpression in the comma-separated list, so in this case the result would have been the Packed flag. All subexpressions are evaluated, from left to right, as relied upon in for loops: (;;i++,j++), and all the compiler notices is when the values of such [sub]expressions are unused. And yes, the compiler will advise this (e.g. "has no effect"), if all warnings are activated (-Wall), or if need be, just -Wunused.


Richard Dobson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >File format conversion (From: Fredrik <email@hidden>)
 >Re: File format conversion (From: William Stewart <email@hidden>)
 >Re: File format conversion (From: Fredrik <email@hidden>)
 >Re: File format conversion (From: William Stewart <email@hidden>)
 >Re: File format conversion (From: Brian Willoughby <email@hidden>)

  • Prev by Date: Re: File format conversion
  • Next by Date: 5.1 Surround-to-stereo AU
  • Previous by thread: Re: File format conversion
  • Next by thread: writing lpcm to file
  • Index(es):
    • Date
    • Thread