ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/util.tcl
(Generate patch)

Comparing ray/src/util/util.tcl (file contents):
Revision 2.1 by greg, Thu Oct 27 15:56:12 1994 UTC vs.
Revision 2.2 by greg, Sun Oct 30 08:33:02 1994 UTC

# Line 29 | Line 29 | proc cardval {var cvl} {       # set variable to one of a se
29          }
30          return {} ;             # this would seem to be an error
31   }
32 +
33 + proc writevars {f vl} {         # write variables to a file
34 +        foreach v $vl {
35 +                upvar $v myv
36 +                if [catch {set il [array names myv]}] {
37 +                        puts $f "set $v [list $myv]"
38 +                } else {
39 +                        foreach i $il {
40 +                                puts $f "set ${v}($i) [list $myv($i)]"
41 +                        }
42 +                }
43 +        }
44 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines