Logo QF-Test

Finding valuable answers
in the Mailing List Archive.

 

Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2017 up to now  | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2007


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

[QF-Test] Propogating procedure paremter values / forcing immediate expansion


  • Subject: [QF-Test] Propogating procedure paremter values / forcing immediate expansion
  • From: "Adrian Chamberlain (BE/ETL)" <adrian.chamberlain@?.com>
  • Date: Thu, 21 Jun 2007 14:52:52 +0200

Hi,
 
I have a small problem concerning procedure parameter values and variable 
bindings which I would appreciate some input on.
 
Example test-suite is attached.
 
Basically,
 
We have Procedure A which has three parameters 'child', 'parent' and 
'grandparent'.
 
We have procedure B which has two parameters 'child' and 'parent'.
 
We call procedure A with the values 'child1', 'parent1' and 'grandparent1'
i.e.
call procedure A('child1', 'parent1' 'grandparent1')
 
Procedure A in turn calls procedure B as follows:
call procedure B($(parent), $(grandparent))
 
This means of course that procedure B will have the following variable
bindings:
'child'  with value of $(parent)
'parent'  with value of $(grandparent)
 
The problem here is that this results in the parameter 'child' expanding to 
the value 'grandparent1'  as apposed to 'parent1' !!
 
Obviously I need the call to procedure B to pass expanded variable
values (i.e. the paramters to procedure A)  to avoid this situation.  In otherwords I 
need to force immediate variable expansion within procedure A.
 
At present the only way I know how to force immediate variable
expansion is through the use of the set variable node.
 
Greg mentioned some months ago that new syntax variants would be introduced
 i.e. $!(variable)  and $_(variable).  
 
$!(variable) would force immediate variable expansion.
 
This I presume would allow me to achieve the following in procedure A :
call procedure B($!(parent), $!(grandparent)), therefore avoiding the introduction
of set variable nodes and consequently procedure B would have the desired 
bindings:
'child' with value of 'parent1'
'parent' with value of 'grandparent1'
 
Are you still planning to introduce these new syntax variants ? 
 
Thank you in advance for your help
Kind Regards
Adrian

Attachment: lazy1.qft
Description: lazy1.qft


Videos Downloads Documentation Buy Free Trial