Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Joost Aan de Brugh wrote: > 5 ; The way I now just thought of. > Make it a pointer and during startup > if *const.COLOR_FILENAME eq "" then void = > Temporary(*consts.COLOR_FILENAME) > and then simply > plot,...,color=fsc_color(color,filename=*consts.COLOR_FILENA ME) > ; This does work. I can dereference the pointer, because it is a valid > pointer to an undefined heap variable. It is still a little bit Yes, this is the way I would do it. It may also be useful in this type of situation to initialize const.color_filename using the ALLOCATE_HEAP keyword: const.color_filename = ptr_new(/allocate_heap) This will make *const.color_filename an undefined variable. Mike -- www.michaelgalloy.com Tech-X Corporation Software Developer II
Hi Mike, > > const.color_filename = ptr_new(/allocate_heap) > > This will make *const.color_filename an undefined variable. > Thanks. This removes the slightly messy first-define-then-destroy-with- Temporary construction. Regards, Joost