Changeset 472


Ignore:
Timestamp:
Dec 4, 2009 5:06:44 PM (14 years ago)
Author:
toby
Message:

# on 2001/10/19 19:27:58, toby did:
Change use of $newhist(setnum) for 8.0 compatibility

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/addcmds.tcl

    • Property rcs:date changed from 2001/10/14 05:36:29 to 2001/10/19 19:27:58
    • Property rcs:lines changed from +8 -3 to +13 -8
    • Property rcs:rev changed from 1.23 to 1.24
    r458 r472  
    746746            grid $np.dl2 -column 0 -row 9
    747747            catch {
    748                 foreach {x tmin tmax x} $newhist(inst${newhist(setnum)}ITYP) {}
     748                set s $newhist(setnum)
     749                foreach {x tmin tmax x} $newhist(inst${s}ITYP) {}
    749750                $np.d1.m1 config -text $tmin
    750751                $np.d1.m2 config -text $tmax
     
    819820    if {$newhist(insttype) == "TOF"} {
    820821        catch {
    821             foreach {x tmin tmax x} $newhist(inst${newhist(setnum)}ITYP) {}
     822            set s $newhist(setnum)
     823            foreach {x tmin tmax x} $newhist(inst${s}ITYP) {}
    822824            if {$newhist(tmin) <$tmin } {
    823825                $np.d1.e1 config -fg red
     
    828830                append msg "Max value of $newhist(tmax) msec is invalid.\n"
    829831            }
     832            set s $newhist(setnum)
    830833            set dmin [expr {1000. * $newhist(tmin) / \
    831                     [lindex $newhist(inst${newhist(setnum)}ICONS) 0]}]
     834                    [lindex $newhist(inst${s}ICONS) 0]}]
    832835            set dmax [expr {1000. * $newhist(tmax) / \
    833                     [lindex $newhist(inst${newhist(setnum)}ICONS) 0]}]
     836                    [lindex $newhist(inst${s}ICONS) 0]}]
    834837        }
    835838    } elseif {$newhist(insttype) == "CW"} {
     
    843846        }
    844847        catch {
    845             set dmin [expr {[lindex $newhist(inst${newhist(setnum)}ICONS) 0]\
     848            set s $newhist(setnum)
     849            set dmin [expr {[lindex $newhist(inst${s}ICONS) 0]\
    846850                    * 0.5 / sin(acos(0.)*$newhist(tmax)/180.)}]
    847             set dmax [expr {[lindex $newhist(inst${newhist(setnum)}ICONS) 0]\
     851            set dmax [expr {[lindex $newhist(inst${s}ICONS) 0]\
    848852                    * 0.5 / sin(acos(0.)*$newhist(tmin)/180.)}]
    849853        }
     
    858862        }
    859863        catch {
    860             set ang [lindex $newhist(inst${newhist(setnum)}ICONS) 0]
     864            set s $newhist(setnum)
     865            set ang [lindex $newhist(inst${s}ICONS) 0]
    861866            set dmin [expr {12.398/ (2.0*sin($ang*acos(0.)/180) * \
    862867                    $newhist(tmax))}]
Note: See TracChangeset for help on using the changeset viewer.