How to return multiple variables from a function

Hello

As seen below, I tried more then return a variable to a function, but I think I have a syntax problem...

function hesapla3 (parameter1, parameter 2): (number & & Boolean) / / PROBLEM IS HERE, I have NEED of TWO VARIABLES to RETURN
{
var yenideger2:Number = new Number();
var bol2:Boolean = new Boolean();
yenideger2 = parameter1 + parameter 2;
if(yenideger2>80) {bol2 = false ;}
Return yenideger2;
return bol2;
trace (yenideger2);
trace (bol2);
}

You can do it this way.

You can combine the 2 to 1 as a var

var tekdeger:String=yenideger2.toString()+"-"+bol2.toString();

Return tekdeger;

and then you can split and mount the value returned into variables that you want...

Tags: Adobe Animate

Similar Questions

  • Return multiple values from a function in a SELECT statement

    I hope I've provided enough information here. If not, let me know what I'm missing.

    I create a view that will combine the information from several tables. Most are pretty simple, but there are a couple of columns in the view that I need to get by running a function within a package. Even if this is quite simple (I have a function named action_date in a package called rp, for example, that I can use to return the date that I need through SOME rp.action_date (sequence_number).

    Here is the question: I really need to return several bits of information of the same record (not only action_date, but also action_office, action_value, etc.)-a join of the tables will work not here, as I will explain below. I can, of course, perform a function separate for each statement, but this is obviously inefficient. Within the select statement of the view, however, I don't know how each of the values that I need to get back.

    For example, right now, I have:

    Table 1:
    sequence_number NUMBER (10),
    name varchar (30),
    ...

    Table2:
    Table1_seq NUMBER (10),
    action_seq NUMBER (10),
    action_date DATE,
    action_office VARCHAR (3),
    action_value VARCHAR (60),
    ...

    I can't just simply join Table1 and Table2 because I have to perform processing in order to determine the rows returned matching, I really need to select. If the package opens a cursor and treats each line until it finds the one I need.

    The following works but is ineffective since all calls to the package returns the columns of the same record. I don't know how to put all the values that I need in the SELECT statement.
    CREATE VIEW all_this_stuff AS
    SELECT sequence_number, name,
    RP.action_date (sequence_number) action_date,
    RP.action_office (sequence_number) action_office,
    RP.action_value (sequence_number) action_value
    FROM table1

    Is there a way to return multiple values in my SELECT statement or I'm going about this all wrong?

    Any suggestions?

    Thank you very much!

    Hello

    What you want is a Query of Top - N , what you can do using the ROW_NUMBER analytic function in a subquery, like this:

    WITH     got_rnum     AS
    (
         SELECT     action_seq, action_dt, action_office, action_type, action_value
         ,     ROW_NUMBER () OVER ( ORDER BY  action_date
                                   ,            action_seq
                             ,            action_serial
                           ) AS rnum
         FROM     table2
         WHERE     action_code     = 'AB'
         AND     action_office     LIKE 'E'     -- Is this right?
    )
    SELECT     action_seq, action_dt, action_office, action_type, action_value
    FROM     got_rnum
    WHERE     rnum     = 1
    ;
    

    As written, this returns a single line (at most).
    I suspect you'll actually get a rank for each group , where a group is defined by a value in a table in which you join.
    In this case, add a PARTITION BY clause to the ROW_NUMBER function.
    If post you a small example of data (CREATE TABLE and INSERT statements), I could show you exactly how.
    As I don't have your tables, I'll show you the use of the tables in the scott schema.
    This is a view containing data in the scott.dept table and also to scott.emp, but only for the highest employee in each Department (in other words, the employee whose oldest hire date). If there be a tie for the first hire date, while the candidate with the lowest empno is selected.

    CREATE OR REPLACE VIEW     senior_emp
    AS
    WITH     got_rnum     AS
    (
         SELECT     d.deptno
         ,     d.dname
         ,     e.empno
         ,     e.ename
         ,     e.hiredate
         ,     ROW_NUMBER () OVER ( PARTITION BY  d.deptno
                                   ORDER BY          e.hiredate
                             ,                e.empno
                           ) AS rnum
         FROM     scott.dept     d
         JOIN     scott.emp     e     ON     d.deptno     = e.deptno
    )
    SELECT     deptno
    ,     dname
    ,     empno
    ,     ename
    ,     hiredate
    FROM     got_rnum
    WHERE     rnum     = 1
    ;
    
    SELECT     *
    FROM     senior_emp
    ;
    

    Output:

    .    DEPTNO DNAME               EMPNO ENAME      HIREDATE
    ---------- -------------- ---------- ---------- ---------
            10 ACCOUNTING           7782 CLARK      09-JUN-81
            20 RESEARCH             7369 SMITH      17-DEC-80
            30 SALES                7499 ALLEN      20-FEB-81
    

    Moreover, one of the conditions to the query you posted has been

    action_office     LIKE 'E'
    

    which equals

    action_office     = 'E'
    

    (AS is always equivalent to = if the string that follows AS does not contain the winning cards.)
    Did you mean say that or did you mean something like this:

    action_office     LIKE 'E%'
    

    Instead?

  • How to return an array from a function package

    It is a package, that give the type of table.

    But it does not work.

    create or replace package account_group is

    TYPE string_array IS the TABLE OF varchar2.

    function get_acc_by_vat_number (in_string varchar2) return string_array;

    end account_group;

    create or replace package body is account_group

    function get_acc_by_vat_number (in_string varchar2) return string_array is

    acc_array string_array;

    i the number;

    cursor c1 is

    (Select to_char (d.account_number) wiz_customer_descrip account_number d, wiz_customer_hp_life l

    where commercial_flag = 'Y '.

    and l.franchise_code! = 'F29'

    and d.account_number = l.account_number

    and id_3 = in_string - vat_number

    - and ssn ='08-09-002272' - company_reg_num

    UNION

    Select to_char (d.account_number) wiz_customer_descrip account_number d, wiz_customer_hp_life l

    where commercial_flag = 'Y '.

    and l.franchise_code = 'F29'

    and d.account_number = l.account_number

    and id_3 = in_string - vat_number

    - and ssn ='08-09-002272' - company_reg_num

    and there are

    (select 1 from WIZ_CUSTOMER_HP_OCCURRENCE p

    WHERE product_category_code in ('MID', "MVO")

    and p.account_number = l.account_number

    and p.service_address_id = l.service_address_id));

    Start

    I: = 0;

    for the news loop c1

    i: = i + 1;

    acc_array (i): = cur.account_number;

    end loop;

    Return acc_array;

    end;

    end account_group;

    Use the functions in pipeline, which give to the appellant, while the dataset is the treatment.

    create or replace package account_group is

    TYPE string_array IS the TABLE OF varchar2.

    function get_acc_by_vat_number (in_string varchar2) return string_array in pipeline;

    end account_group;

    create or replace package body is account_group

    function get_acc_by_vat_number(in_string varchar2) return pipeline string_array is

    acc_array string_array;

    i the number;

    cursor c1 is

    (Select to_char (d.account_number) wiz_customer_descrip account_number d, wiz_customer_hp_life l

    where commercial_flag = 'Y '.

    and l.franchise_code! = 'F29'

    and d.account_number = l.account_number

    and id_3 = in_string - vat_number

    - and ssn ='08-09-002272' - company_reg_num

    UNION

    Select to_char (d.account_number) wiz_customer_descrip account_number d, wiz_customer_hp_life l

    where commercial_flag = 'Y '.

    and l.franchise_code = 'F29'

    and d.account_number = l.account_number

    and id_3 = in_string - vat_number

    - and ssn ='08-09-002272' - company_reg_num

    and there are

    (select 1 from WIZ_CUSTOMER_HP_OCCURRENCE p

    WHERE product_category_code in ('MID', "MVO")

    and p.account_number = l.account_number

    and p.service_address_id = l.service_address_id));

    Start

    I: = 0;

    for the news loop c1

    pipe row (c.account_number);

    end loop;

    return;

    end;

    end account_group;

  • Return multiple values from a table

    Hi there I'm working on a bit of sql that returns values when they exist in a table.
    The code I have returns the correct value when there is an entry in the tbl_studentmodules table, as soon as there is more than one entry in this table it does display no line at all: (.)

    Can someone tell how to return multiple values?

                 select modulename from tbl_modulefeedback
    where 1 = (select count(*) from tbl_studentmodules
           where upper(:APP_USER) = upper(student_id))
    and 1 = (select count(*) from tbl_modulefeedback, tbl_studentmodules
          where tbl_modulefeedback.modulecode = tbl_studentmodules.modulecode)
    Thanks in advance!

    Ashleigh

    Try this:

    select modulename
    from tbl_modulefeedback
    where 1 <= (select count(*) from tbl_studentmodules
           where upper(:APP_USER) = upper(student_id))
    and 1 <= (select count(*) from tbl_modulefeedback, tbl_studentmodules
          where tbl_modulefeedback.modulecode = tbl_studentmodules.modulecode)
    

    When you ask questions, please enter CREATE TABLE and INSERT some commands to make it easier to help you.

  • How to return two values of a function?

    Hi all
    I have a function which returns a varchar2 value. This value is used in the SQL of a ref cursor

    Now I want this function returns two values. I tried to use varray, but could not accomplish the task.

    Can you tell me how can I find the two values from a function? and how this function can be called in a SQL query?

    Thank you very much

    The query should look like:

    SELECT v.col.name AS name
         , v.col.flag AS flag
    FROM   ( SELECT kk_test_kk(t.somecolumn,t.someothercolumn,42) AS col
             FROM   sometable t ) v;
    

    Note that you need to prefix with the name of view inline ('v' in the example) and the expression of the function ('col' in the example).

  • How to return multiple values

     create procedure emp_p ( v_r OUT emp%rowtype )
     AS
     Begin 
     select * into v_r from emp;
     end;
    I called the procedure as below
     declare
     v_x emp%rowtype;
     Begin
     emp_p(v_x);
     end;
    Error

    declare
    *
    ERROR on line 1:
    ORA-01422: exact fetch returns more than number of lines
    ORA-06512: at "SYS." EMP_P', line 4
    ORA-06512: at line 4 level



    Thank you
    REDA

    infant_raj wrote:

    create procedure emp_p ( v_r OUT emp%rowtype )
    AS
    Begin
    select * into v_r from emp;
    end;
    

    OUT parametere v_r could contain data for one line only, so if your query

    Select * into v_r from emp

    returns multiple rows, you're bound to get "ORA-01422: exact fetch returns more than number of lines.

    You can use SYS_REFCURSOR or Collections instead.

    Vivek L

  • Another REGEXP question: how to extract multiple values from a string

    Hi, how can I retrieve multiple values to a string with RegExp with Oracle SQL constructs?

    Have looked at the various examples, I cannot understand this.
    the following Sql code
    select
       regexp_substr(sessie."rollen", 'CN=A_role') "A_role"
       from ( 
    select '
    CN=A_role,OU=a_org_unit,OU=another_org_unit,DC=bz,DC=ad,DC=min,DC=local
    CN=Another_role,OU=some_org_unit,DC=bz,DC=ad,DC=min,DC=local
    CN=Users,OU=Dep,DC=bz,DC=ad,DC=min,DC=local
    '   "rollen" from dual
    ) sessie;
    Returns CN = A_role.
    I want him back all of the CN = concatenated values with a semicolon and stripped of the CN = bit.
    So: A_role; Another_role; Users .

    Any help would be much appreciated. Here I use database 11g 11.2.0.2.0.

    Does anyone have an idea how to do this in SQL?

    best regards Mike

    Hello
    If using Oracle 11 g

    with tst
      as (select   'CN=A_role,OU=a_org_unit,OU=another_org_unit,DC=bz,DC=ad,DC=min,DC=local,'
                 ||'CN=Another_role,OU=some_org_unit,DC=bz,DC=ad,DC=min,DC=local,'
                 ||'CN=Users,OU=Dep,DC=bz,DC=ad,DC=min,DC=local' as rollen
            from dual
          )
    select listagg(sub, ',') within group (order by rn) as res
      from (select regexp_substr(rollen, '(CN=)([[:alnum:]_]+)',1,rownum,'i',2) sub, rownum rn
              from tst
           connect by level <=length(rollen)
           )
     where sub is not null       
    
  • How to return a message of a function

    Hi gurus,
    I wrote the function on my database related to the return of the specific table voucherdate
    I want to return one message if other that this condition means that if vouchers No. is not there or if there is no null vouchertype is provided.

    my function is
    -------------------
    create or replace fn_get_voucherdate (v_vouchertype in varchar2, v_compcode in numbers)
    date of return
    as
    date of v_voucherdate;
    Start
    If v_vouchertype = "B - P" then
    Select max (voucherdate) from v_voucherdate
    from sometables where vouchertype = v_vouchertype and companycode = v_compcode;

    Return v_voucherdate;

    elsif v_vouchertype = "C - P" then
    Select max (voucherdate) from v_voucherdate
    from someothertables where vouchertype = v_vouchertype and companycode = v_compcode;

    Return v_voucherdate;

    elsif v_vouchertype = "C - R" then
    Select max (voucherdate) from v_voucherdate
    from someothertables where vouchertype = v_vouchertype and companycode = v_compcode;

    Return v_voucherdate;

    elsif v_vouchertype = s-P' then
    Select max (voucherdate) from v_voucherdate
    from someothertables where vouchertype = v_vouchertype and companycode = v_compcode;

    Return v_voucherdate;
    on the other
    return a message here;
    end if;

    but the message by not returning function showing no matter what return value error

    Please guide me how display a message to the user.

    Please answer...

    but the message by not returning function showing no matter what return value error

    as it is coded your function returns a DATE data type
    It cannot return any "message".

  • How to access a variable from a mxml mxml in another?

    I have Vbox with Hbox turn hbox has some components... TextInput...

    I m adding that Vbox in another mxml... by iteration file...

    I need the sum of all the input values in the text boxes to display in the text box in another Mxml...

    I take the sum in a variable and you want to show tha some in another file...

    How can I get this variable in my resulting mxml?

    TIA

    If you have another component in MXML it compiles to be a class. You can create a public function to sum the values in the component - allows you to call valueTotals(). If in your application, the mxml component has an id of "MyComponent" then you can access the totals as myComponent.valueTotals ().

    It is a way to do it, but maybe this isn't the best way. It's certainly better than the access to all the individual values in MyComponent.

    Paul

  • How to create multiple hierarchies from the same physical table

    Hi all

    I have a physical table to join with a fact table: there are 3 different hierarchies, which share the last 2 levels inside the dimension table. It's the logic diagram of hierarchies:

    Dimension services
    -Business
    -Sector
    -Type
    -Operator
    -Product
    Partner of dimension
    -Partner
    -Operator
    -Product
    Contractor of dimension
    -Contractor
    -Operator
    -Product

    All columns are in the same table physical source. I tried to create 3 table logic source from the same physical table, everyone with all the columns and create a hierarchy for each dimension table, but it gives me nQSError: 15011.

    Any suggestion? Maybe the physical table alias can help for the creation of tables of different sizes?

    Thanks in advance,
    Concerning

    Hello

    It is a basic rule that you cannot create multiple hierarchies in a single dimension table, so what you do is create three tables of alias and slip into MDB layer in 3 different sizes and on top these tables create 3 different dimension hierarchies.

    Check if useful/correct

    Thank you.

  • How to download multiple files from creative cloud

    I downloaded about 30 photos of creative cloud storage. Now, I can't find a way to download a group or all at the same time. You can select multiple and move to different folders within CC, but can not download multiple. I had known this before using it, I would have done a zip of images folder. It seems a bit awkward, if this is true.

    [email protected]

    Thanks for the info. As a professional user, more features in storage would be useful. At the moment I am using to other file storage and transfer solutions that are far superior.

    I think most of the users of cloud would very well agree with you.

    The cloud is now a reasonable version 1, but it is clumsy, he lacks the basic features and is a latecomer to a mature market quickly. Other offers currently shine in comparison.

    Our expectations as consumers are very high, because we are accustomed to the are (and other superior 3 third-party solutions) there.

    Adobe has been flooded with suggestions of features and improvements from users. The more, the better.

    They could, as they claim, work on improvements, but they move on until the cloud tarnishing its own reputation too due to the lack of (expected) features.

    [email protected] wrote:

    Furthermore, the links in your post do not lead anywhere.

    Jive forum software used by Adobe creates bad links.

    Correct links are:

    Three things I'd like to see...

    http://forums.Adobe.com/ideas/1789

    Three ideas: file sharing, channel, branded email notification

    http://forums.Adobe.com/ideas/1706

    Share files and channel brand?

    http://forums.Adobe.com/ideas/1701

  • How to return a value from stored procedure.

    Hello

    I have an insert in which insert a username through generated sequence number.

    I need this generated sequence number stored procedure return.

    Kindly help me to achieve this goal.

    It might be useful if there is a code sample for the same thing.

    Thank you
    Ahmed Shareefuddin

    Something like this:

    create or replace procedure xproc (num out number) is
    begin
     insert into mytab values (myseq.nextval);
     select myseq.currval into num from dual;
    end;
    /
    

    Max
    http://oracleitalia.WordPress.com

  • How to return multiple images using the batch command

    With the help of Fireworks 8.

    I have a document with more than 200 executives. In the "Command"-> "Batch commands" menu I have the possibility of rotation and or multiple or individual images blur.

    What I would really like to do is to return all 200 images horizontally, but there is no option to do this at the same time.

    Or is it?

    Tell me that I'm not stuck with the only option of failover each picture individually.

    I have knocked down an image and recorded my actions as a command, but this "Flip" command could not be applied to several frames.

    Help out me.

    Thanx.

    You will need to use the feature to peel the onion of the Panel frames, as
    Alex said.

    Go to the control panel frames. Assign to all managers of onion (the box on the)
    left side of each image - click on the Executive in the area of skin of onion,
    Then click on the lower frame. You will see a line connecting all the
    frames) then click and drag on your entire canvas area to select all
    executives. If you have saved the command, you will find at the bottom of
    the menu of commands.

    This does not work, I just did.

    --
    Jim Babbage-. : Community MX:. &. : Adobe Community Expert:.
    Extend the knowledge, every day
    http://www.communityMX.com/
    CommunityMX - free resources:
    http://www.communitymx.com/free.cfm
    ---
    . : Fireworks adobe community expert:.
    News://forums.Macromedia.com/Macromedia.Fireworks
    News://forums.Macromedia.com/Macromedia.Dreamweaver

    CashComm wrote:
    >

    Quote:
    EDIT > TRANSFORM > FLIP HORIZONTAL. Do it once, then go to history
    > Panel and save a command customized. You have access to the
    > batch operations.
    > However this will affect only the first image of the top layer unless
    > other images or layers are selected manually.
    >


    > Thanks for your response Jim. I did everything as you described. I chose fram 1,.
    > so I chose the layer in the fram in the layers panel. I spilled usig
    > CHANGE it, TRANSFORM menu. In the history panel, I saved this command as
    > "FLIP".
    > I have selected 2-10 images, hold down the SHIFT key. Then I went to the
    > Menu command and selected my "FLIP" command and received an error message telling me "
    > that it could not apply.
    > I tried to find out where my Flip order is registered thinking that I'm going in
    > Explorer and drag it to the folder of command Batch that I could use it. But I have
    > could not find my FLIP order, even if it works perfectly if I'm changing
    > fram one at a time and only then if I select the layer in this context first.
    >
    > Apparently recorded commands do not work on several images.
    >
    > So I'm in a situation where I have to use the flip command or CHANGE-->
    > TRANSFORM caraa command on each fram individually.
    >
    > It's frustrating.
    >

  • How to return multiple screens? There used to be a drop-down list of the recent screens in a tab. Thank you.

    The navigation bar contains icons arrow to move forward or backward a screen in a tab, but previous versions of Firefox has also provided a drop-down list of recent Web pages allowing the user to return more than one screen with a single click. This feature is always available?

    The feature was not removed, see article #5 tools rear without drop-down - menu bar button use right-click (or left click hold for a second) for the drop-down list

    in what follows:

    You can make Firefox Firefox 5.0 look Firefox 3.6.19, paragraphs numbered 1 to 10 in the next topic difficulty Firefox 4.0 UI toolbar, problems (Make Firefox 5.0, or 4.0.1 resemble 3.6). If you make changes, you must be aware of what has changed and what it takes to use changed or missing features.
  • How to use global variables from a dll in another (not multi-threaded)

    With LabWindows/CVI. I try to be compatible with legacy code, so this isn't the best way to do things, but it saves me some headaches.

    I have a project/.dll called "GlobalBlock" that contains some parameters used widely throughout the program. The entire program consists of several DLLs, for the purpose of encapsulation.

    GlobalBlock.c contains:

    menu_sdef G_setprefs = struct
    {
    ... stuff

    };

    sys_fileheader_sdef Level1Version = struct
    {
    ... more

    };

    struct G_sys_flags sys_flags_sdef;

    In the dll that owns the variable, use the _export on this qualifier. This will ensure that it is placed in the list of the interface dll. In the application (dll or other) that wants to make reference to that variable, use the qualifier _import on it. This tells the system to use the associated import library that comes with the dll in order to resolve references running.

    JR

Maybe you are looking for