Is there any operator in silktest (like '&' and '*' in C lang)which can be used to store the adress of one variable into another. Can we make use of pointers in Silktest ??
We don't have pointers in SilkTest.But there is a similar kind of thing, may not be the same. See the following:
[ QUOTE ]
[ ] integer i = 10
[ ] integer j
[ ] j = @("i")
[ ] print(j)
[/ QUOTE ]
prints value stored in the variable 'j', which points to the variable 'i'.Notice that 'j' won't store the address of 'i' here.
I hope this help you
Try and fail, but don't fail to try
Thanks a lot. It will certainly help me.
also argument passing modes "in" (default), "out", "inout" can be used to simulate pointers functionality of C and C++
In the above given example what is the difference of following two statements
both the print statements will print 10.
None, but that's a side issue. The example given in the helptext may be more helpful:
<font class="small">Code:</font><hr /><pre>
Print ("In TestFunc")
STRING s = "foo"
STRING sVariable = "s"
STRING sFunc = "TestFunc"
Print (s)************// Prints: foo
Print (sVariable)****// Prints: s
Print (@sVariable)***// Prints: foo
// Calls TestFunc, prints: In TestFunc