- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Not able to use the variables stored from the response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-24-2010 04:53 PM
Hi ,
I am trying to find the average of two numbers.
For this I used linux 'od -An -N2 -i /dev/random %100' command.
I run this commands twice and storing the returned response into $randvalue1 and $randvalue2.
When I try to find the average of those to values by ' set z [expr [expr $randvalue1 + $randvalue2]/2]'
iTest is reporting error that $randvalue1 is not found.
I am attaching the test and the report here.
If anybody can pointme how to do this, that would be greatful.
Thanks,
Venkat
Solved! Go to Solution.
Re: Not able to use the variables stored from the response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-24-2010 08:33 PM
The problem is that you checked the box that stored randvalue1 in a global variable. But $randvalue1 will only find a local variable with that name. If you need to fetch it from a global variable, then you need to use [gget randvalue1].
I suspect that you don't need to make this global anyway. Right?
Re: Not able to use the variables stored from the response
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-25-2010 11:57 AM
Thanks Paul.
It worked the way without global variable.
