[cad-linux] Re: data format vs data system

  • From: Eric Wilhelm <ewilhelm@xxxxxxxxxxxxx>
  • To: cad-linux@xxxxxxxxxxxxx
  • Date: Fri, 19 Sep 2003 08:53:30 -0500

> The following was supposedly scribed by
> Janek Kozicki
> on Friday 19 September 2003 07:05 am:

>and yet we will have to find some kind of solution. I think that each
>directory could have a file with those attributes listed. It will be
>treated just like declaring variables that have the scope of the current
>directory. Any other files in this directory can refer to this attribute
>and treat it as a value (everything is passed as text, numbers also)
>
>Calling this directory from somewhere else (like inserting a block) will
>have the ablility to define the values of those variables. If not
>defined - then use default value. If default value is missing - then
>print warning on stderr, and use nothing (empty value).

Maybe the use of the package and lexical scope models from Perl would be good.  
This allows you to declare "my" variables which are only visible within the 
enclosing {block} (directory in our case) and package variables, which are 
visible from anywhere using $Package::variable.

I think the same scheme can be easily mapped into C.

--Eric

-- 
"It ain't those parts of the Bible that I can't understand that 
bother me, it's the parts that I do understand."
                                        --Mark Twain


Other related posts: