SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Deleting Array elements

    User Abdul Nazeer (abdul.nazeer@db.com.nospam) posted:


    Hi All,

    See my sample WR script is like

    ......
    ..............
    .............

    Sample[0] = "Name-1";
    Sample[1] = "Name-2";
    Sample[2] = "Name-3";

    f_calculation(Sample[]); // Function Call

    ........
    .......

    for(i=0; i<=2; i++)
    {
    delete Sample[i];
    }


    Sample[0] = "Name-1";
    Sample[1] = "Name-2";

    f_calculation(Sample[]); // Again the Same function Call
    ....
    ....

    Where even though we are using delete command, the array elements are not at all deleted. When we call the function
    second time, still the "Sample" array carries Name-3 value also.Please tell me some solution for the above problem.

    Cheers.............
    Naz
    ================================================== ===============================================
    Reputation is what people think you are... Personality is what you seem to be.... Character is what you really are.....
    ================================================== ===============================================
    --

    This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

  2. #2
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Deleting Array elements

    User (asim.baig@cressoft.com.pk.nospam) posted:

    Brother Nazeer use the following TSL

    {
    Sample[]
    # i.e without subscript to delete the whole array
    }

    i hope this helps
    Asim Zafar.
    "Abdul Nazeer" <abdul.nazeer@db.com> on 01/16/2002 01:53:41 PM

    Please respond to winrunner@yahoogroups.com

    To: winrunner@yahoogroups.com
    cc: (bcc: Asim Baig/CresSoft)

    Subject: [winrunner] Deleting Array elements

    Hi All,

    See my sample WR script is like

    ......
    ..............
    .............

    Sample[0] = "Name-1";
    Sample[1] = "Name-2";
    Sample[2] = "Name-3";

    f_calculation(Sample[]); // Function Call

    ........
    .......

    for(i=0; i<=2; i++)
    {
    delete Sample[i];
    }


    Sample[0] = "Name-1";
    Sample[1] = "Name-2";

    f_calculation(Sample[]); // Again the Same function Call
    ....
    ....

    Where even though we are using delete command, the array elements are not
    at all deleted. When we call the function
    second time, still the "Sample" array carries Name-3 value also.Please tell me
    some solution for the above problem.

    Cheers.............
    Naz
    ================================================== ===============================================

    Reputation is what people think you are... Personality is what you seem to
    be.... Character is what you really are.....
    ================================================== ===============================================

    --

    This e-mail may contain confidential and/or privileged information. If you are
    not the intended recipient (or have received this e-mail in error) please notify
    the sender immediately and destroy this e-mail. Any unauthorized copying,
    disclosure or distribution of the material in this e-mail is strictly forbidden.


  3. #3
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Deleting Array elements

    User (asim.baig@cressoft.com.pk.nospam) posted:
    oops i forgot to write DELETE

    {
    delete Sample[]
    # i.e without subscript to delete the whole array
    }
    asim.baig@cressoft.com.pk on 01/16/2002 02:33:47 PM

    Please respond to winrunner@yahoogroups.com

    To: winrunner@yahoogroups.com
    cc: (bcc: Asim Baig/CresSoft)

    Subject: Re: [winrunner] Deleting Array elements

    Brother Nazeer use the following TSL

    {
    Sample[]
    # i.e without subscript to delete the whole array
    }

    i hope this helps
    Asim Zafar.
    "Abdul Nazeer" <abdul.nazeer@db.com> on 01/16/2002 01:53:41 PM

    Please respond to winrunner@yahoogroups.com

    To: winrunner@yahoogroups.com
    cc: (bcc: Asim Baig/CresSoft)

    Subject: [winrunner] Deleting Array elements

    Hi All,

    See my sample WR script is like

    ......
    ..............
    .............

    Sample[0] = "Name-1";
    Sample[1] = "Name-2";
    Sample[2] = "Name-3";

    f_calculation(Sample[]); // Function Call

    ........
    .......

    for(i=0; i<=2; i++)
    {
    delete Sample[i];
    }


    Sample[0] = "Name-1";
    Sample[1] = "Name-2";

    f_calculation(Sample[]); // Again the Same function Call
    ....
    ....

    Where even though we are using delete command, the array elements are not
    at all deleted. When we call the function
    second time, still the "Sample" array carries Name-3 value also.Please tell me
    some solution for the above problem.

    Cheers.............
    Naz
    ================================================== ===============================================


    Reputation is what people think you are... Personality is what you seem to
    be.... Character is what you really are.....
    ================================================== ===============================================
    --

    This e-mail may contain confidential and/or privileged information. If you are
    not the intended recipient (or have received this e-mail in error) please notify
    the sender immediately and destroy this e-mail. Any unauthorized copying,
    disclosure or distribution of the material in this e-mail is strictly forbidden.


  4. #4
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Deleting Array elements

    User Abdul Nazeer (abdul.nazeer@db.com.nospam) posted:
    Thanks Asim Zafar.My Script is working fine now.
    Rds
    Naz
    --

    This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 13.64%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:46 AM.

Copyright BetaSoft Inc.