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

Named Indices



Hello,

    I am brand new to IDL programming.  I am using version 5.3.1 on a PC
and started going through some examples from my Digital Image Processing
(DIP) class as well as some from the online manuals and Dave Fanning's
book.  I got to wondering if there exists (either built-in or developed
by someone else) a list of named indices. Such a beast would be useful
for specifying things line styles using names instead of numbers.

For example,

    PLOT, time, curve, LineStyle=LongDash

makes more sense to me than

    PLOT, time, curve, LineStyle=5

One idea I had was to create a structured system variable named !I (for
indices) which then has the various indices as fields.  For example:

    !I.Solid = 0
    !I.Dot = 1
    !I.Dash = 2
    !I.DashDot = 3
    !I.Dash3Dot = 4
    !I.LongDash = 5

I couldn't find a reference to such a system variable.  Furthermore, I
don't even know if it is possible to create new system variables like
this.  Finally, if something like this can be created, I don't want to
reinvent the wheel if it already exists.

Any and all advice is greatly welcomed.

Thanks,
Jason Meyers
Ph.D. Student, Center for Imaging Science
Rochester Institute of Technology
jpm7934@rit.edu