Declare the variable in the loop or abroad?

What is the smartest, if the statement is a loop much like 100000. Is there a difference?

* for(int i = 0; i < 100000; i++) {*}
Dim myStr = getSomething();
*}*

or

Dim myStr = "";
* for(int i = 0; i < 100000; i++) {*}
myStr = getSomething();
*}*

No, there is no performance difference (that's what you thought, weren't you).

The basic rule by declaring variables is "the smallest scope possible. So in this case inside the loop for.

Tags: Java

Similar Questions

  • declare the variable binding

    I do homework here and ran into the wrong hope that someone here can help

    1. I thought that I understand the conscept of variable binding (which I think it is the same concept as the pointer in C/C++ programming), is that correct?

    2. I write the code and find the problem below, please point out what I did wrong?


    SQL & gt; describe the plants
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    PLANTID NOT NULL NUMBER (5)
    COMMONNAME NOT NULL VARCHAR2 (30)
    LIKE NOT NULL VARCHAR2 (30)
    SPECIES NOT NULL VARCHAR2 (30)
    FLOWERCOLOR VARCHAR2 (10)
    HEIGHT NUMBER (4.1)
    DATE OF ACQUIREDDATE
    LISTPRICE NUMBER (6.2)




    SQL & gt;
    declare


    bv_color variable varchar2 (10);
    v_price plants.listprice%Type;



    cursor cur_color is
    Select distinct lower (flowercolor) color
    plants;



    Start


    for rec_color looping cur_color

    : bv_color: = rec_color.color;



    Select avg (listprice)
    in v_price
    plants
    where lower (flowercolor) =: bv_color;



    dbms_output.put_line)
    "The average price for our plants with ' |: bv_color |"
    "flowers is $' | Round(v_price,2) | '.');
    dbms_output.put_line ('thank you');



    end loop;



    exception
    while others then
    dbms_output.put_line (' my exception:' | sqlcode |)
    ' : ' || SQLERRM);
    end;
    /
    SP2-0552: Bind "BV_COLOR" variable not declared.

    This is the way of declaring bind variables in SQL * more.

    In a PL/SQL block, you do not use bind variables like SQL * more. You just use normal variables. The PL/SQL engine is smart and sends SQL statements to the SQL engine containing all PL/SQL variables converted to bind variables. If it works transparent in PL/SQL and you don't have to do something more.

    Kind regards
    Rob.

  • change the same variable in different loops

    Hi all

    I use an event producer/consumer-controlled architecture where the two loops run processes acting on a common variable.

    To be more precise, I intend to change a flag photo in the loops of consumer and producer. That's why I need to share this variable between the two loops.

    I thought that the best way to do this is to use the indicator of functional photo as part of a Global Variable:
    1 / FGV initialization, which is a cluster that contains the indicator image

    2 / in two loops, the image indicator last value is extracted from the FGV using an action of 'read '.

    3 / the value of the indicator of picture is wired through different processes that would change partially or totally

    4 / Finally, in two loops the photo update flag values are wired as input to the FGV.

    Above is the ideal case, I expected to work. However, this does not work, and is what I've actually implemented:

    (a) in the loop of the producer, the indicator of picture is updated via a shift register, and at the same time, the new value is stored in the FGV

    (b) in the loop of consumption, the indicator of the image is retrieved from the FGV, and its present value is stored in the FGV (as in the ideal case)

    Then I don't why it does not work. I use other FGVs in my VI and which are modified by two loops, but THEY work...

    My VI is really great, so I can't take a picture of him. Can I give you a diet simplified what is my current architecture, whose shot at him. I hope it helps.

    Thank you.

    Florian

    Hi Florian.

    Two FGV reads on the left side of your curls below will be a problem unless you use the data flow to control. The FGV bed (as shown) will occur at the start and then after the structure of each loop ends. When you really want to 'read' when Gets an element from the queue or in the loop of photo - when there are new values.

    The loop of consumption is fairly easy to treat. Just run the Dequeue 'error' error 'in' on your FGV. This will ensure that playback of the FGV happens when you get a new item.

    The photo event loop is a bit tricky. You could send a user of the consumption loop event (after your FGV write) to the photo event loop. In this case the user loop photo, put a reading of the FGV. This ensures that you will get the changes made in the loop of the consumer. The only downside to this approach is that the photo loop always runs once when a change is made in the loop of the consumer. You can use a Boolean value to prevent the image to be written (ensures also the image is always written after the end of the event Structure).

    Here is an example:

    Steve

  • by the way the variable counter between the loops

    I have a question about the passage of a variable counter between different events / while loops and seen an increase in value regardless of the loop is initiated.

    The fundamental problem is that I write file names unique to data collected on a spectrometer, and I would value at the end of the name of the file to increment every time that I collect the data. There are several different ways that I can collect the data, and I'd like the counter to increment when the collections is triggered. The attachment shows essentially what I'm trying to accomplish. Represent it buttons collect two different types of data I collect my instrument, but the counter variable is not passed correctly between the two loops. Is it possible that I can get the incrementing counter so that the two loops read the same value of counter?

    Thanks for your help.

    MICAH

    I can't look at your code since I'm on a phone. But you should really only have / need a structure of the event in a vi. The only exception I can think of is one to manage the events of the user and the other for GUI events. But even in this case there is no reason that I can think to need two.

  • Declare the Variable step in a package

    Hello

    Is it obligatory to declare a variable in a package, even when we are refreshing or set the value of this variable in the package? What are the problems that occur in the case where a variable is not declared in the package?

    Please note that I understand that the variable must be romance in the package in case it is not be refreshed or set or incremented but is used by any step in the package.

    Thank you and best regards,

    PV

    Hi PV.

    You must declare a variable, unless it is explicitly used in the package to arm, refreshing or evaluate its value (as you mentioned).

    You must declare also specifically when:

    • You want its value to be passed during execution (runtime scenarios)
    • You want to use in the name of the resource to a data store in a scenario
  • Cannot be used for the loop variable 'i' twice?

    Something weird is happening with a dialog box that I'm doing that dynamically creates buttons based on the number of objects in a table that I pass in a function. I say weird, but it's obviously me not understanding how the variables in a loop. See below:

    mrp = {
        one: [new File("/Users/constantincerdan/Creative%20Cloud%20Files/Templater/Iconbuttons/bagspouches.png"), "One"],
        two: [new File("file:///Users/constantincerdan/Creative%20Cloud%20Files/Templater/Iconbuttons/beauty.png"), "Two"],
        three: [new File("file:///Users/constantincerdan/Creative%20Cloud%20Files/Templater/Iconbuttons/bluepocketsquare.png"), "Three"]
    }
    
    function Dialog(dialogTitle, buttons) {
    
        var dlg = new Window("dialog", dialogTitle + " - OU");
        dlg.margins = [20, 15, 20, 17];
        dlg.buttonsGroup = dlg.add("group");
        dlg.buttonsGroup.orientation = "row";
        dlg.buttonsGroup.spacing = 15;
    
        for(var i = 0; i < buttons.length; i++){
            templaterButton = dlg.buttonsGroup.add("iconbutton", undefined, buttons[i][0])
            templaterButton.onClick = function(){
                open(buttons[i][0])      
                dlg.close()      
            }
            dlg.buttonsGroup.add("panel", [undefined, undefined, 0,120])
        }
        dlg.show()
    }
    Dialog("Test",[mrp.one, mrp.two, mrp.three])
    
    
    
    
    
    
    

    Execution of this poster dialog very well, and all the icon buttons have their own photos as they should (see photo below).

    This is what confuses me: line 16, he is able to use I on the buttons [i] [0] very well get every image and use it, but for some reason any when I also try to use the same thing to line 18 to try to open the real images for each button, I get the error "undefined is not an object" on this line. Change key [i] [0] to line 18 to the key [0] [0] opens the first image very well (on three keys), so I can't understand what I'm doing wrong here?

    Screen Shot 2016-02-04 at 22.44.44.png

    The problem is that the function that executes the dialog box is not a variable that I exist. It is a function that get-called on the fly. One thing you can do is to use 'this' in the service running, so it will point to the iconbutton that you clicked on, unfortunately there is no default property of this button that can point to the actual file, there is only the property "icon" but that only gives the name of the file and not its full path , but you can create a custom property that can point to the path to the file like this:

    MRP = {}

    a: [new file ("/Users/constantincerdan/Creative%20Cloud % 20Files/Templater/Iconbuttons/bagspouches program. PNG"),"One"],

    two: [new file ("file:///Users/constantincerdan/Creative%20Cloud%20Files/Templater/Iconbuttons/beaut y.png"), "Two"],

    three: [new file ("file:///Users/constantincerdan/Creative%20Cloud%20Files/Templater/Iconbuttons/bluep ocketsquare.png"), "Three"]

    }

    function {Dialog (dialogTitle, buttons)

    var DLG = new window ("dialog", dialogTitle + "- OR");

    DLG. Margins = [20, 15, 20, 17];

    dlg.buttonsGroup = dlg.add ('group');

    dlg.buttonsGroup.orientation = "row";

    dlg.buttonsGroup.spacing = 15;

    for (var i = 0; i)< buttons.length;="">

    templaterButton = dlg.buttonsGroup.add ("iconbutton", undefined, buttons [i] [0]);

    templaterButton.myFile buttons [i] [0] ;// = my custom property

    templaterButton.onClick = function() {}

    App.Open (this.) MyFile);

    Open (this.) MyFile); / / use the property of the selected object

    DLG. Close();

    }

    dlg.buttonsGroup.add ('panel', [undefined, undefined, 0,120])

    }

    DLG. Show()

    }

    Dialog box ("Test" [mrp.one, mrp.two, mrp.three])

  • Put the loop of variables in a single table with formatting (PHP)

    I have the following loop;

    <? PHP

    $i = 1;

    While ($i < = $num_rows)

    {

    $tempquantity = "extra". $i.' quantity ';

    $tempcomments = "extra". $i."comments";

    $tempname = "extra". $i.' name ';

    $tempprice = "extra". $i."price";

    $$tempquantity = $_POST ['extra'. $i. "quantity"];

    $$tempcomments = $_POST ['extra'. $i. "Comments"];

    $$tempname = $_POST ['extra'. $i. "name"];

    $$tempprice = $_POST ['extra'. $i. 'price'];

    Print "Extra name: $$tempname;

    Print "< br / > ';

    Print "Extra price:". "." $$tempprice;

    Print "< br / > ';

    Print "quantity:". "." $$tempquantity;

    Print "< br / > ';

    Print "reviews:". "." $$tempcomments;

    Print "< br / > < br / > ';

    $i++;

    }

    ? >

    Which, since there are 3 rows, outputs the following:

    Extra-Nom: dfvgfddf

    Extra price: 4

    Quantity required: 67

    Customer reviews: gtfh


    Extra-Nom: wewew

    Extra price: 34

    Required quantity: 45

    Customer feedback: thtrt


    Extra name: ewewe

    Extra price: 43

    Required quantity: 12

    Customer feedback: gdfgg

    I want to be able to do is to show the output above in a PHP email body variable which, according to me, this means that the loop variables must be in a single array variable as coding in a body of email variable is not allowed. How can I put a loop of variables like that in a single variable, and how to keep the < br / > tags and names before variables ("name Extra:' etc."), so it seems that it should in the PHP email body?

    Thanks in advance

    I also need to set the variables generated by the loop in a single database field

    Why?  Looks like a mistake to me.

    Anyway, why not change it.



    The name of the tenant: $rentername

    on this subject.



    " The tenant's name: $rentername.

    $i = 1;

    While ($i<>

    {

    $tempquantity = "extra". $i.' quantity ';

    $tempcomments = "extra". $i."comments";

    $tempname = "extra". $i.' name ';

    $tempprice = "extra". $i."price";

    $$tempquantity = $_POST ['extra'. $i. "quantity"];

    $$tempcomments = $_POST ['extra'. $i. "Comments"];

    $$tempname = $_POST ['extra'. $i. "name"];

    $$tempprice = $_POST ['extra'. $i. 'price'];

    $body. =<>

    Additional name: $$tempname

    Extra charge: $$tempprice

    Required amount: $$tempquantity

    Customer reviews: $$tempcomments

    EOT;

    $i++;

    }

    and then remove the loop where it occurs earlier.

  • How to declare global variables with the help of another global variable in ODI

    I declare a variable gloabal using another global variable.
    Suppose for example that:

    I have a global variable empid.
    I'm decalaring an another global variable empname refreshing the global variables tab and select statement is

    Select empname emp where empno = #GLOBAL .empid - if I write like this I get the error message like character not valid.

    Select empname emp where empno = ' #GLOBAL.empid '-if I write like this I get the error message in the number not valid.

    I kept the datatype as digital and non-persistent action

    Help, please

    Thank you in advance.

    Hello

    You must perform this operation from a package.

    V1 (COOLING MODE) - OK---> V2 (REFRESH MODE)

    Thank you
    Fati

  • Variable to URL in the list of the loop

    I have a query in a loop that should receive a value of a url string, but I don't know how to reference the string variable in the loop. I get an error with my method.

    ? P1 = open

    ? P2 = open

    ? P3 = open

    etc etc.

    I have to loop through my query < cfloop from = "1" to = "#menu. ' RecordCount # ' index 'i' = >

    but, I want to place the url variable in the loop as well

    < ul rel = "#URL.p [i] #" > <!-it gives me an error.--> I can do this < ul rel = "#URL.p1 #" > and it works, but I need for the feature based on p1, p2, p3 etc. ""

    How could refer to this variable in a loop?


    #URL.p [i] #.

    Almost.  If your url variables are named p1, p2, etc, the syntax is:

    #URL [' p #i # '] #... OR

    #URL ['p' & I] #.

  • The possibility of declaring the variable on request?

    Hello

    With the help of Oracle 9i. I'm new to the PL/SQL (coming from c#), I would like to know if it is possible to declare a variable around the where it is used. For example, in the execution of the procedure block, suppose I want to do:

    .. existing code...

    vTest whole;
    vTest: = 123;

    .. existing code (continued)...

    In doing so, the procedure could not compile. The only way I know to date is to declare the whole vTest. in the declaration block. Can you please let me know how to declare the variable in the body of the procedure?

    Thanks in advance.

    It is technically possible, but I wouldn't recommend it (I personally do not like this approach a LOT).

    ME_XE?create or replace procedure testin  2  as  3  4     vparamone   number default 123;  5  6  begin  7  8     declare  9        vparamtwo   number default 456; 10     begin 11        vparamone   := vparamtwo; 12     end; 13     dbms_output.put_line(vparamone); 14  end; 15  /
    
    Procedure created.
    
    Elapsed: 00:00:00.29ME_XE?exec testin;456
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.01ME_XE?
    
  • Value of the loop variable for begins with the last entry of the previous run

    I have a problem with a loop for... I am a beginner with Labview and perhaps do not follow the order of events (since it runs not on a line-by-line as typical of programming languages), but I think that my problem is trivial.

    Say I'm running a loop for 16 iterations and I want to build a table which, for example, consists of four 0s, 1 4s, four 2s and 3 four s.   I initialize the array outside and using shift registers to be added to the matrix in the loop for.

    However, the first time I run the program I get funky results.  In subsequent runs, the first value in my table is a 3, and the rest of the rest of the table is moved down by 1, so I did that three 3s at the end (for example).

    Can someone help me understand how to solve this problem?

    Thank you

    George


  • If doesn't work is not inside the loop for the registration of the declaration file?

    Hello!

    I have the following documents open in Photoshop:

    123456_mrp_ou. TIF

    869548_mrp_ou. TIF

    896589_mrp_in. TIF

    896589_mrp_ou. TIF

    .. and I have this if statement in a loop for to search for files with a specific 'pid' number and save them in the folder My Documents:

    var originalPid = 896589
    for(i = 0; i < app.documents.length ; i ++) {
          activeDocument = app.documents[i]
            if(activeDocument.name.substring(0,6) === originalPid) {
                    var standardSave = new File('/Users/constantincerdan/Documents/' + activeDocument.name)
                    activeDocument.saveAs(standardSave, TiffSaveOptions, false, Extension.LOWERCASE)
    }
    }
    
    
    

    It did not find the two files and save them when I run. However, the loop without if statement runs very well and saves all the documents in the Documents folder:

    var originalPid = 896589
    for(i = 0; i < app.documents.length ; i ++) {
          activeDocument = app.documents[i]
                    var standardSave = new File('/Users/constantincerdan/Documents/' + activeDocument.name)
                    activeDocument.saveAs(standardSave, TiffSaveOptions, false, Extension.LOWERCASE)
    }
    
    
    

    How it works with an if statement so that it saves only the two?

    Any help is very appreciated!

    You are comparing apples to oranges, you need to compare strings.

    originalPid = 896589;

    alert (typeof originalPid);

  • Variable is empty but the loop is executed

    Hello

    Can someone explain what follows...

    C:\ > $vms = Get - VM

    C:\ > $vms

    C:\ > foreach ($vm in $vms) {Write-Host "Test $vm"}

    Test

    C:\ > Get-PowerCLIVersion

    PowerCLI Version

    -


    VMware vSphere PowerCLI 4.1 build 264274

    Connected to an ESXi 4.1 root hosts, there is no VM then why the loop runs once? I know that to achieve the above, there are easier methods, but for other reasons, I need to loop, it was just a test to prove what is for me a phenomenon.

    Any help appreciated.

    Thank you, Andy.

    Post edited by: avarcher

    I believe that this is because PowerShell by assigning a null value to $vm.  If you want to avoid going there you can test $vm - eq $Null before you begin the ForEach, or you can use $vm = @(Get-VM).

    Dave

    VMware communities user moderator

    Now available - vSphere Quick Start Guide

    You have a system or a PCI with VMDirectPath?  Submit your specifications to Officieux VMDirectPath HCL.

  • How to make a loop with variable values depending on where you are in the loop

    Hello

    I need loops / nested loops that choose different figures depending on where you are in the loop.

    The entire function must operate at times 'ml '. 'ml' is a dynamic figure.

    Loop 1 = while the loop is the first 12 iterations, "exconemp" must be equal to 100. 13-24 iterations, 'exconemp' to 102.5 equal, for 25-36 TI 105.06, 37-48, it will be 107.69. This must change each 12th iteration until he reached 'ml '. The calculation takes the value of the previous 'exconemp' and then that multiply by 0.025.

    Loop 2 = while the loop is in 120 first iterations, 'abc' should be equal to 0.015 and additional iterations should use 0.01. It should also work in a way to know if 'ml' is greater or less than 120 and work accordingly.

    My main problem is - this - how can I get loops to go like this:

    While the iteration is < 12, to do this, THEN take the final figure (12th iteration) and begin the 13-24, make this SO etc etc.

    How to produce a THEN statement? I can get the code to pick up the final values, but does not change along the way.

    I think I might better create an array for loop 1, but I'm not entirely convinced of that. Also, I think it would be better/more net if I can get "month total 1 ' and ' month 2 total ' in loops, but do not know how to do this.

    The values I need to produce (only 36 first shown):

    1-12 = 125.55, 251,65, 378.31, 505.52, 633.29, 761.63, 890.53, 1019.99, 1150.03, 1280.63, 1411.81, 1543.57
    13-24 = 1679.05, 1815.12, 1951.79, 2089.06, 2226.93, 2365.41, 2504.50, 2644.20, 2784.52, 2925.45, 3067.00, 3209.18
    25-36 = 3355.19, 3501.85, 3649.15, 3797.11, 3945.71, 4094.96, 4244.87, 4395.44, 4546.68, 4698.57, 4851.14, 5004.38

    var ml = 240 / / dynamic figure, multiple of 12 up to 780
    var exconemp;
    var exconem = 100;
    var inf = 0.025;
    Tree var;
    var tec;
    power of the var;
    var fvis;
    var abc;
    var fvee;
    MVT var;
    function myfunction() {}

    Loop 1

    While (ml < = 12) {}
    exconemp = exconem;
    // }
    so that {(ml > 12)
    exconemp = exconem * inf;
    //}

    end loop 1

    trace ("exconemp =", exconemp); employee contribution

    tree = exconemp /(1-0.2)-exconemp;
    TEC = exconemp + tree;
    trace ('tree', tree);
    trace ("tec", tec);
    power = Math.pow (1 + 0.07, 1/12);

    Loop 2

    While (ml < = 120) {}
    ABC = 0.015;
    //}
    then {}
    ABC = 0.01;
    //}

    end loop 2

    fvis = power *(1-abc/12);
    trace ("fvis =", fvis);
    FVEE = tec * fvis;
    trace ("fvee =", fvee); month 1 total
    MVT = (CET + fvee) * fvis;
    trace ("MVT =", MVT); month 2 total
    //

    for (var i: Number = 0; i < ml; i ++)
    {
    MVT = (CET + MVT) * fvis;
    trace ("tfvloop =", MVT);
    }
    }

    I hope that I've explained this well enough.

    Thanks in advance.

    I think that will do it even if I don't quite get the numbers you posted.

    Stop();

    var ml = 48; figure dynamic, multiple of 12 up to 780
    var exconemp;
    var exconem = 100;
    var inf = 0.025;
    Tree var;
    var tec;
    power of the var;
    var fvis;
    var abc = 0.15;
    var fvee;
    MVT var;

    MyFunction();

    function myfunction()
    {
    exconemp = exconem;

    for (var index: uint = 1; index)<= ml;="">
    {
    trace(index + "--------------------------------");
               
    tree = exconemp /(1-0.2)-exconemp;
    TEC = exconemp + tree;
    power = Math.pow (1 + 0.07, 1/12);
    fvis = power *(1-abc/12);
    FVEE = tec * fvis;
                       
    if(index == 1)
    {
    trace ("month 1 total =", fvee);
    }
    another if (index == 2)
    {
    MVT = (CET + fvee) * fvis;
    trace ("month 2 total =", MVT); month 2 total
    }
    on the other
    {
    MVT = (CET + MVT) * fvis; now that we're here the MVT auto perpetuates on himself
    trace ("months" + index + "total =", MVT); month total n
    }
                       
               
    If (index %12 == 0)
    {
    exconemp = exconemp *(1+inf);
    trace ("changed to exconemp to:" + exconemp);
    }
               
    If (index % 120 == 0)
    {
    ABC =. 01;
    trace ("changed abc to:" + abc);
    }
               
    }
    }

  • Need help to identify the type of object in the loop of pl/sql

    Hello

    I need help to identify the Type of object declared beneath a procedure as shown below:

    I need to pass the parameter to the procedure as a TYPE of OBJECT and also refer to variables of Type Object in a loop

    create or replace type TEST_VALIDATION_REC is RECORD (order_num varchar2 (30),)

    number of inventory_item_id

    reserved_YN varchar2 (1).

    error_flag varchar2 (1).

    Error_message varchar2 (2000)

    );

    CREATE OR REPLACE TYPE VALD_TBL AS VARRAY (10000) OF TEST_VALIDATION_REC;

    PROCEDURE ADD_TO_ORD)

    p_lot_number_list IN VALD_TBL,

    p_ord_number IN Varchar2,

    p_user_id in NUMBER: = fnd_profile.value ('USER_ID'),-change 1.10

    p_responsibility_id in NUMBERS: = fnd_profile.value ('RESP_ID'),-change 1.10

    p_application_id IN VARCHAR2: = 'PO',-change 1.10

    x_error_flag OUT Varchar2,

    x_error_msg OUT Varchar2

    )

    In the above procedure, I had the VALD_TBL. Is it OK?

    And how in the loop if the records if I use:

    FOR indx1 IN 1.p_lot_number_list. COUNTY

    LOOP

    BEGIN

    SELECT

    inventory_item_id

    IN

    ln_item_id

    Of

    dummy_lot_tab

    WHERE

    lot_number = p_lot_number_list (indx1); - > how direct the item here?

    EXCEPTION

    WHILE OTHERS THEN

    ln_item_id: = NULL;

    END;

    Records are PL/SQL objects.  They are not the SQL objects.  You can create a SQL TYPE (schema level) as a collection (variable-tables only, tables nested).

    So therefore your first statement is syntactically incorrect

    CREATE OR REPLACE TYPE TEST_VALIDATION_REC IS RECORD
    (order_num VARCHAR2(30),
    inventory_item_id NUMBER,
    reserved_YN VARCHAR2(1),
    error_flag VARCHAR2(1),
    Error_message VARCHAR2(2000)
    );
    

    You must put in an anonymous PL/SQL block or the stored procedure

    DECLARE
    
       TYPE test_validation_rec IS RECORD
       (
        order_num VARCHAR2(30),
        inventory_item_id NUMBER,
        reserved_YN VARCHAR2(1),
        error_flag VARCHAR2(1),
        error_message VARCHAR2(2000)
       );
    
       TYPE vald_tbl iS VARRAY(10000) OF test_validation_rec;
    
       lv_tbl vald_tbl;
    
    BEGIN
    
       lv_tbl := vald_tbl();
      -- insert your code here 
    
    END;
    

Maybe you are looking for