 |
|
The online community for software testing & quality assurance professionals
|
|
|
|
|
|
|
|
|
JakeBrake
Moderator
Reged: 12/19/00
Posts: 15264
Loc: St. Louis - Year 2025
|
Re: = ** CODE SHARE ** =
05/16/07 07:27 AM
|
|
|
= ** Captured Dynamic Array Handler / ORD ** = What does this do? 1. It stuffs the count of a web_reg_save_param-captured array into a C integer. 2. The “for” loop code forces each item within the array (one at a time) to be written to a LR parameter. It goes without saying that {Tempnamestr} is over-written each pass through the loop. So really, one would never do this in practice for two reasons: ooo Turning on logging of parameters does the same thing, and ooo You would not normally over-write a parameter without having used it elsewhere first. 3. So the purpose of this is to demonstrate how one would take an ordinal-item value and save it to a LR parameter for later use. //============================================================== Action() { int i, ItemNumCount; char namestr[20];
// your web_reg_save_param // your web submit or web url
ItemNumCount = atoi(lr_eval_string("{namestr_count}")); for (i=1;i <=ItemNumCount;i++) { sprintf(namestr, "{namestr_%i}", i); lr_save_string(lr_eval_string(namestr), "Tempnamestr"); lr_message("Name: %s", lr_eval_string("{Tempnamestr}")); }
return 0; } //==============================================================
|
|
0 registered and 14 anonymous users are browsing this forum.
Moderator: JakeBrake, TedZlat, AJ, James Pulley, terri c
|
Forum Permissions
You cannot start new topics
You cannot reply to topics
HTML is disabled
UBBCode is enabled
|
Rating:    
Thread views: 12101
|
|
|
|
|
|
Powered by UBB.threads™ 6.5.5
| | |