[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mathematical Operation!




[email protected] said:
> Hi guys,

> I want to evaluate the ratio of the total # of packets departed and 
> the total # of packets arrived at a queue

> i.e. set ratio [[$qm set departures_] / [$qm set parrival_]] where qm 
> is a QueueMonitor object

> Can you help with the correct syntax, the one above is incorrect!

Use tcl command expr, it should be something like

set ratio [expr [$qm set departures_] / [$qm set parrival_] ]

Mingzhou Sun
ECSE, RPI