[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using octal codes for special characters

davidf@dfanning.com (David Fanning) writes:
> ... Note the 
> double quote in front of the octal number and the "B" to 
> force it to be a byte value.

Soapbox: May I recommend that *nobody* use double-quote octal codes in
their new IDL programs.  They are abominable to look at, can be
ambiguous, and are confusing.  The fact that the second quote never
appears is particularly insidious.

The "single-quote" form is not much better, but at least it is
consistent in the sense that there are two matching quote characters.

These two expressions perform the same operation:

  a = '355'OB    ; SINGLE QUOTE FORM
  a = "355b      ; DOUBLE QUOTE FORM

I believe the first form should always be preferred.


Craig B. Markwardt, Ph.D.         EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response