comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: Undefined variables in structures

Re: Undefined variables in structures
type: item
description: 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
creator: Michael Galloy
date: 2008-09-11T04:45:18-00:00

Re: Undefined variables in structures
type: item
description: 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
creator: Joost Aan de Brugh
date: 2008-09-11T08:03:52-00:00