Part of the Practical IDL Programming Web

Thanks to David Shadovitz, Zhengjun Hu, Luis Garcia Weil, and Brad Conrad for finding most of these errors.

p. 36, "Guarding against Division by an Integer": In the example shown, all entries in the array result are 0, except for the last element which is equal to 1.

p. 48, "and Operator": The and operator returns the second argument if both arguments are floating point and non-zero.

p. 53, first code example: It should read

IDL> image={name:'Test Image', valid_range:[0.0, 100.0], $
IDL> data:dist(256)}

p. 57, second sentence: It should read "the number of variables", not "the number or variables".

p. 86, second last paragraph: The end of the last sentence should read "and at locations between the original values (0.5, 1.5)."

p. 108, "break Statement": A break statement causes an immediate exit from a case or switch statement, not a jump to the next case.

p. 109, page header: It should read "3.2 Control Statements".

p. 110, third line: The closing parenthesis is missing from the filepath call.

p. 137, third code example and "Tip": In both cases, the expression (a gt 100) should be (a gt 100.0).

p. 144, second code example: The read command should be

IDL> read, year, prompt='Enter year (YYYY): ', format='(i4)'

p. 167, first paragraph, last sentence: It should read "Finally the header and array are written to disk.".

p. 184, Table 4.10: Several of the HDF SD routines are listed twice (e.g., hdf_sd_start) to show they have more than one function (e.g., open an existing HDF file, or create a new HDF file).

p. 185, page header: It should read "4.7 Reading and Writing HDF Files".

p. 207, last code example: It should read

IDL> erase, !d.table_size - 1

p. 208, second code example: The values of xsize and ysize should be set at the beginning of the example, e.g.

IDL> xsize = 640
IDL> ysize = 512

p. 242, Table 6.5: All instances of "default;" should be "default:".

p. 276, "Shaded Surface Plots": The second sentence of the first paragraph in this section should read "the general syntax for shade_surf is

shade_surf, z, x, y

p. 352, "Note": The last sentence should read "See the online help for more information on the keywords accepted by color_quan."

p. 402, Table 9.2: The footnotes show the single-dagger twice.  The second instance should be the double-dagger.

p. 404, Table 9.4: The purpose for the /no_release keyword should read "Generate only "press" events for exclusive or nonexclusive buttons."

p. 459, last code example: The final two lines should read

IDL> read_jpeg, filepath('rose.jpg', subdir='examples/data'), $
IDL> rose

p. 484, Table D.1: All instances of "(default: pixels)" should read "(default units: pixels)".

Liam E. Gumley