Wanna send integer value by reference in function

I wanna send integer value by reference thro' function. Here's the code going.
class test
basic b = new basic();
test()
test2.Fuction(b.value);
class basic
int value;
basic(){}
//////here i want value to be affected by Function.I don't want it affected by value, but by reference.
class test2
public static void Function(int value)
value++;

If you want to update the value in your b object, then you have to pass the reference of that object to test2.Function(..). Here is one way to do it:
class test {
  basic b = new basic();
  test() {
    test2.Function(b);
class test2 {
  public static void Function(basic b) {
    b.value++;
}It's a good idea to follow the java naming convention. Classes should begin with an upper case letter. Methods and variable names with a lover case letter (but final static variables with all upper case letters).

Similar Messages

  • Unable to send integer value from action class to jsp

    Hi,
    i have scenario like ,
    In my action class ,,
    DemoAction.java
    int samplevar = 3 ;
    // appending it to string since request accepts only objects.
    String sample = ""+samplevar
    request.setAttribute("sampleVar",sample );
    Demo.jsp
    <% int demovar = Integer.parseInt(request.getAttribute("sampleVar")) ; %>
    But i am unable to get the value.. what might be the reason please help...

    T.PD wrote:
    Welcome to the forum.
    855548 wrote:
    DemoAction.java
    int samplevar = 3 ;
    // appending it to string since request accepts only objects.
    String sample = ""+samplevar// You should better stick with a number object type:
    Integer sample = new Integer(samplevar );
    // or leave conversion to autoboxing (java 1.5+)
    Integer sample = samplevar ;request.setAttribute("sampleVar",10) is same as request.setAttribute("sampleVar",new Integer(10)) ;
    No explicit AotoBoxing is required as the second argumet is of java.lang.Object type. It will automatically autobox with java.lang.Integer.
    >
    request.setAttribute("sampleVar",sample );// you must put that in the response, not in the request...
    response.setAttribute("sampleVar",sample );This is not right. You have to set the attribute in request object as you are getting the attribute back in jsp from the request object.
    855548 wrote:
    Hi!! thanks for answering the question,,
    i have tried doing as u said , but still m getting the following error:
    On Compilation of JSP.
    cannot resolve symbol
    symbol : method parseInt (java.lang.Object)
    location: class java.lang.Integer
    int numberofcols = Integer.parseInt(request.getAttribute("noOfCols"));
    kindly help.request.getAttribute("noOfCols") gives you an object of java.lang.Object. Integer.parseInt(String str) requires a string.
    do this....
    int numberofcols = Integer.parseInt(request.getAttribute("noOfCols").toString());

  • One LIFNR, based on a function can send multiple values to traget.

    Dear SDNers,
    I need your help to solve this problem…
    Let me explain the situation.
    I have a field value “LIFNR”, which is sending a value from the source to target.
    Here by using a User Define Function based on parameters I have to map the exact target.
    The problem is:
    Currently I am having a function which is sending  a value to the target based on parameters and some times the target values are more that a single value. At that situation the function returns a random value to the target value.
    In the below Old Function there is a method used to execute only one value, if more than one values are there then it will select a random value from them and send that value to the destination.
    IFIdentifier src = XIVMFactory.newIdentifier(strContext, senderAgency, senderScheme);
    IFIdentifier dst = XIVMFactory.newIdentifier(strContext, receiverAgency , receiverScheme);
    String strResult = XIVMService.executeMapping(src, dst, a);
    Solution as in New Function,
    I have created a array to that particular destination variable and stored all value in array and passed to that target value. I have bold that letters.
    //here I run a loop to store multiple destination value
    if(receiverService.length>1)
    for(i=0;i<receiverService.length;i++)
    if (receiverService.equals("EM1CLNT003")||receiverService.equals("KM1CLNT003")||receiverService.equals("C11CLNT003")) receiverAgency<i> = "C11CLNT003";
    I am sending both the functions
    My question is is that LIFNR can send the multiple values to the detination for this change ?
    And also I want to know how to execute this program and transport and testing this UDF.
    Please need your inputs.
    Thanks
    Bala Prasad
    4. Old Function
    java.util.regex.Pattern;java.util.Vector;java.util.regex.Matcher;com.sap.aii.mapping.value.api.*;
    public String get_Value_Mapping_Table_V(String a,String scheme,String context,Container container){
    // PART1 : First we need to get the sender - and receiver service from the container object
    GlobalContainer globalContainer;
    String senderService = new String();
    String receiverService = new String();
    java.util.Map map;
    //Fill variables
    globalContainer = container.getGlobalContainer();
    map = globalContainer.getParameters();
    // Get the sender- and receiver service constants
    senderService = (String) map.get(
    StreamTransformationConstants.SENDER_SERVICE);
    receiverService = (String) map.get(
    StreamTransformationConstants.RECEIVER_SERVICE);
    // PART2: Now we need to find the correct value mapping table
    String strContext = context;                                //some context value
    String senderScheme = scheme;                                    //VendorNumber or VendorAccountGroup
    String receiverScheme = scheme;
    String receiverAgency = new String();
    if (receiverService.equals("EL1CLNT100")||receiverService.equals("KL1CLNT100")||receiverService.equals("PL1CLNT100")) receiverAgency = "PL1CLNT100";
    if (receiverService.equals("D01CLNT100")||receiverService.equals("T01CLNT100")||receiverService.equals("P01CLNT100")) receiverAgency = "P01CLNT100";
    if (receiverService.equals("EM1CLNT003")||receiverService.equals("KM1CLNT003")||receiverService.equals("C11CLNT003")) receiverAgency<i> = "C11CLNT003";
    String senderAgency =  "MEPCLNT100";
    IFIdentifier src = XIVMFactory.newIdentifier(strContext, senderAgency, senderScheme);
    IFIdentifier dst = XIVMFactory.newIdentifier(strContext, receiverAgency , receiverScheme);
                try {
                            String strResult = XIVMService.executeMapping(src, dst, a);
                            return strResult;
                } catch (ValueMappingException e) {
                            return a;
    5. New Function
    java.util.regex.Pattern;java.util.Vector;java.util.regex.Matcher;com.sap.aii.mapping.value.api.*;
    public String get_Value_Mapping_Table_N(String a,String scheme,String context,Container container){
    // PART1 : First we need to get the sender - and receiver service from the container object
    GlobalContainer globalContainer;
    String senderService = new String();
    String receiverService = new String();
    java.util.Map map;
    //Fill variables
    globalContainer = container.getGlobalContainer();
    map = globalContainer.getParameters();
    // Get the sender- and receiver service constants
    senderService = (String) map.get(
    StreamTransformationConstants.SENDER_SERVICE);
    receiverService = (String) map.get(
    StreamTransformationConstants.RECEIVER_SERVICE);
    // PART2: Now we need to find the correct value mapping table
    String strContext = context;                                //some context value
    String senderScheme = scheme;                                    //VendorNumber or VendorAccountGroup
    String receiverScheme = scheme;
    String receiverAgency[] = new String(); //here I changed into a array to store multiple value
    if (receiverService.equals("EL1CLNT100")||receiverService.equals("KL1CLNT100")||receiverService.equals("PL1CLNT100")) receiverAgency = "PL1CLNT100";
    if (receiverService.equals("D01CLNT100")||receiverService.equals("T01CLNT100")||receiverService.equals("P01CLNT100")) receiverAgency = "P01CLNT100";
    //here I run a loop to store multiple destination value
    if(receiverService.length>1)
    for(i=0;i<receiverService.length;i++)
    if (receiverService.equals("EM1CLNT003")||receiverService.equals("KM1CLNT003")||receiverService.equals("C11CLNT003")) receiverAgency<i> = "C11CLNT003";
    }String senderAgency =  "MEPCLNT100";
    IFRequest src = XIVMFactory.newIFRequest(strContext,senderAgency,senderScheme);
    IFRequest dst = XIVMFactory.newIFRequest(strContext,receiverAgency,receiverScheme);
                try {
                            String strResult = XIVMService.executeMapping(src, dst, a);
                            return strResult;
                } catch (ValueMappingException e) {
                            return a;

    Janaki,
    "and it did not work."
    That's useless information.
    When asking for help with a technical question here, you need to describe exactly what you did, showing all code, explaining the entire context in which the code is used, and showing all error messages and actual results along with a description of the expected results.
    One thing though, if this example is based on the standard EMP table, why does "depno" have no "t" in it in all your references?
    Scott

  • Send and recieve 2 byte integer values.

    hi,
    basically i'm trying to allow my applet and servlet communicate using 2 byte signed integer values. but i haven't figured out how to store an integer value into a byte array of size 2, or unpack it once it gets there.
    here's some code/psuedocode that i've done so far.
    SERVLET:
    ByteArrayOutputStream bst = new ByteArrayOutputStream(streamsize);
    ServletOutputStream bout;
    byte[] strm = new byte[streamsize];
    byte[] dbyte = new byte[2];
    int[] testarr = new int[10];
    /* fill my testarr with values... */
    bout = response.getOutputStream();
    int l = 0;
    for (int i = 0;i<arraysize;i++){
    getDoubleByteFromInteger(dbyte,testarr)
    strm[l++] = dbyte[0];
    strm[l++] = dbyte[1];
    bst.write(strm,0,streamsize);
    bst.writeTo(bout);
    APPLET:
    /* connect to servlet and get binary stream */
    bytecount = in.read(streamb);
    byte[] db = new byte[2];
    counter = 0;
    while (cursor < bytecount){
    db[0] = streamb[cursor++];
    db[1] = streamb[cursor++];
    array[counter++] = getIntFromByte(db);
    the functions getIntFromByte and getDoubleByteFromInteger haven't been written, can anyone give me a little push? or tell me if this is something possible? thanks for any help
    Matt

    The primitive type short is a two-byte signed integer, so you really don't need to bother with byte arrays - just use DataOutputStream to write it (it has a method called writeShort) and DataInputStream to read it (with readShort()).
    But anyway, getting an int from two bytes and getting two bytes from an int is easy with the bitwise operators:
    int -> byte array
    int i = yourInt;
    byte[] b = new byte[2];
    b[1] = (byte) (i >> 8);
    b[0] = (byte) (i);
    byte array -> int (unsigned)
    int i = ((b[1] & 0xFF) <<8) + (b[0] & 0xFF);
    byte array -> short -> int (signed)
    short s = (short) ((b[1] & 0xFF) <<8) + (b[0] & 0xFF);
    int i = s;

  • SSRS - Pass Field Value List To Custom Function Assembly And Display Result

    I have written a SQL Server Reporting Services custom function as a C# assembly DLL and added it to my report. The purpose of the function is to search for outlier records in a collection of data. The data is represented as an array of floating point -tuplets
    (float[][]). In a medical patient database, these might be things such as blood pressure, cholesterol, hight, weight, waist measurement, etc.
    Several user input parameters are provided in the report, including numeric seed values for this particular algorithm. One multivalued parameter is a list of the numeric columns to be used as input to the algorithm because, importantly,
    the user can choose any subset of the value columns. I have a tablix that will display columns from the dataset conditionally, based on which of those columns are chosen.
    At this point, there are two issues I'm having difficulty with:
    How do I, in the course of running the report, take just the numeric columns that the user has chosen (ignoring all others in the dataset) and pass them as a float[][] to my custom function? Or is there something in the
    Microsoft.ReportingServices namespace that I should use to query an input dataset and convert it to an array in my C# code?
    How can I present the array subset returned by my custom function in a tablix in the report?
    Note: One thought that occurs to me is that outlier records tablix could be contained in a subreport, but I'm not clear on the logistics of passing dataset field results from a master report to a subreport.
    I envision a final report when run to be similar to the following:
    - Mark Z.

    Hi Mark,
    Sorry for the delay.
    From your description, you want to pass the dataset data to a custom code array, and return the subset of the array, right? In this case, you can use a custom function to add the data to array, and use the a custom function to sort the data base on your
    requirement and then use a function to get the subset of the array. Here are some sample custom code for your reference.
    Add to arryay
    Dim values As System.Collections.ArrayList=New System.Collections.ArrayList()
    Function SetText(ByVal value As Integer) As Integer
        values.Add(value)
        return value
    End Function
    Sort array
    Function Sort()
    Dim i as Integer
    Dim j as Integer
    Dim t as Integer
    Dim n as Integer=values.Count-1
    For i=n To 1 Step-1
     For j=0 To i-1
     if values(j)<values(j+1) Then
        t=values(j)
        values(j)=values(j+1)
        values(j+1)=t
     End if
     Next j
    Next i
    End Function
    Return value.
    Function Rank(ByVal value As Integer)
       return values(value)
    End Function
    Assume that you pass [Weight] field to array, you can use the expression below on the Weight column:
    =Code.SetText(Fields!Weight.Value)
    Then use the expression below to get the values.
    PatientID:=Sort() & Lookup(Code.Rank(0),Fields!Weight.Value,Fields.Patient.Value,"Dataset")
    Height:=Lookup(Code.Rank(0),Fields!Weight.Value,Fields.Height.Value,"Dataset")
    Weight:=Code.Rank(0)
    Hope this helps.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Assigning return value of a javascript function to a variable

    hi.
    I have a javascript function which returns string.
    I wanna assing return value of that function to variable.
    for example:
    <script>
    funtion writeMe()
    var ex;
    ex="try"
    return ex;
    </script>
    Then in body of JSP page. I wanna do something like:
    <% String st;%>
    Now I wanna assign the value that returned from writeMe function ("try") to st string.like:
    <%st= writeMe();%>. but of course it doesn't work. how can I do that?

    thnx. but actually what I want to do is sending some values produced by javascript to a barchart object. is it impossible too?
    I mean my script function returns something like "100, 200, 300". I wanna pass that values to barchart. when I want to add aplet tag to jsp code instead of writing:
    <param name="s1_value" value="100,200,300">
    I want to write somethin like:
    <param name="s1_value" value="myscriptfunction()">
    is it possible in JSP? I saw an example like this in asp. it was like:
    <param name="sampleLabels" value="<%call func1()>">. but in JSP it seems like call tag doesn't work. Is it possible in JSP?

  • Unable to retreive the return value of pl/sql function using DB Adapter

    Dear Experts,
    I am using DB Adapter in my BPEL Process. Using DB Adapter I am invoking a PL / SQL function. I am able to send two input parameters for the pl/sql function. But I dont know how to retrieve the return value from the function. Please suggest me.
    Thanks,
    Rajesh

    Yes I am returning a value from PL/SQL function.
    Please see the code segments below,
    FUNCTION "TD_INSERT" (a TDINIT_TYPE, stops TDDETAIL_TABLE )
    RETURN VARCHAR2
    AS
    td_no Number;
    td_id Number;
    stop TDDETAILFULL_TYPE;
    length number;
    BEGIN
    insert into TD_INIT values( ----passing all the values here --------- );
    select max(tdno) into td_no from TD_INIT ;
    length := stops.count;
    for i in 1.. length loop
    stop := stops(i);
    insert into TD_DETAIL_FULL values(
    td_no, ------- );
    end loop;
    commit;
    RETURN td_no;
    END;
    Thanks,
    Rajesh

  • Sending Date value to SAP R/3

    Hi,
        I am trying to send Date value from Text box (javascript) to SAP R/3 thru transaction and BAPI. But it is not accepting it. In SAP it accepting time value but it is not accepting date value. It take default date (current system date).
    But when we give date value directly in transaction it accepts.
    what is the problem. how to solve it?
    Regards,
    Senthil

    Your text box is a string.  If you assign it to a Local (or Transaction) Property of type DateTime, xMII may properly interpret it and allow the DateTime value to be populated.  However when you try to map it to SAP, it will most likely fail as it is of datatype DateTime (which is actually xml datetime).  You can assign the text box value to a Local Property with datatype String and format it from there.  Or if your Local Property is correctly interpreting the string from the text box and is updated, then you can explicitly convert from xml datetime to string type.
    functions which might be of interest or applicable are:
    datefromxmlformat
    dateformat
    stringpart
    Good luck,
    Mike

  • KE28 with" Copy Characteristic Value with Reference Data" doesn't work

    Hi experts:
    We need to make a top-down setting the processing option 'Copy Characteristic Value with Reference Data'. We have the following source data:
    Customer Business Unit  Value field.
    6        #              100
    On the other hand, we have plan data as reference data:
    Customer Business Unit  Value field.
           A              40
           C              40
           D              20
    We need to run a top-down to distribute from client to Business Unit but copying client of reference data. Then, we set 'Copy Characteristic Value with Reference Data' and, in the selection criteria we set '*' for customer.
    After running, the result is that the system can find 1 sender and 3 receivers. It is exactly what we are expecting. However, program doesn't make individual items and anything is distributed.
    We have found notes 1086282 and 1273924 but the result is the same after implementing these notes.
    Thanks in advance for your help.
    Best regards
    Jose

    There are some restrictions on the XML Schema format that you can report off of in Crystal Reports.
    If you're using the ODBC XML driver, you may find this of relevance:
    [http://resources.businessobjects.com/support/communitycs/TechnicalPapers/cr_xml_data_sources.pdf|http://resources.businessobjects.com/support/communitycs/TechnicalPapers/cr_xml_data_sources.pdf]
    and if you're using the native XML driver, the following gives a guide for the accepted formats:
    [http://resources.businessobjects.com/support/communitycs/TechnicalPapers/cr_xi_native_xml_driver.pdf|http://resources.businessobjects.com/support/communitycs/TechnicalPapers/cr_xi_native_xml_driver.pdf]
    Sincerely,
    Ted Ueda

  • RFC_ERROR_INTERNAL (when trying to set values on my remote function)

    Hi everyone,
    I've been playing with JCo for a few days now, and I got it to work to a certain point, that being, I am able to query my sap tables and add records to them.
    My problem is:
    I've set a function with two import parameters, let's say USERNAME and PASSWORD, both LIKE two other fields from one of my tables, and an export parameter called return with type C, which is supposed to be 0 or 1. (user good or not)
    I ran this remote function in standalone mode and everything works out like I want it to, so guess no problems here.
    <i>For clarity sake, i should say i'm not trying to build an authentication remote function like them standard BAPI's so please don't point me in that direction. I don't have R/3 access for the time being, so this is being done on MBS, which, while limited, should be more than enough to fulfill my purposes.
    </i>
    Unfortunatelly when i try to execute this function from a simple java test app i get the following exception thrown:
    [code]com.sap.mw.jco.JCO$Exception: (108) RFC_ERROR_INTERNAL: Internal error: rec->cdata == NULL
    [/code]
    And this is how i'm trying to do it in Java:
    [code]public boolean checkPassword(String username, String password) {
        JCO.Function function = getFunction("Z_RFC_CHECK_LOGIN");
        JCO.ParameterList listParams = function.getImportParameterList();
        listParams.setValue(username, "USERNAME");
        listParams.setValue(password,"PASSWORD");
        try
                aConnection.execute(function); // <<<------Exception points here when debugging!
        catch(Exception e)
            System.out.println("ERROR -" +e);
            //e.printStackTrace();
        JCO.ParameterList resultParams = function.getExportParameterList();
        JCO.Field field = resultParams.getField("RETURN");
        String reply = field.getString();
        System.out.println("REPLY: "+reply);
        if (reply.equals("0"))
        return true;
        else
        return false;
        }[/code]
    So basically I can't seem to send out values to my RF, and for that matter, nor can i get a return value.
    I can, however make the following code work successfully:
    [code]JCO.ParameterList stParams = function.getImportParameterList();
                JCO.Structure est_clientes = stParams.getStructure("WA_PEOPLE");  
                est_clientes.setValue("1","PERSON_CODE");
                est_clientes.setValue("Duarte", "NAME");
                est_clientes.setValue("Porto","ADDRESS");
                aConnection.execute(function);[/code]
    But, on my <i>problematic</i> previous example, still won't work if I try for example:
    [code] JCO.Field p_code = params.getField("PERSON_CODE"); [/code]
    and then setting the value with:
    [code] p_code.setValue("Duarte"); [/code]
    I know the code is kinda junky right now but like i said it's just for testing my skills with JCo for now. Any help on this would be apreciated, thank you in advance for any replies.
    Best Regards,
    Duarte

    Thanks for replying,
    It's working now, it turned out I was wrong about the problem being with my java code.
    I basically forgot to set the Remote-Enabled option on my FM attributes.
    Imagine how i felt after a full day of head banging on this matter, i guess the joke was on me for today
    Anyway sorry if i wasted anyone's time with this, I genuinelly thought i had it all figured out.
    Regards,
    Duarte

  • How to retrieve a string value from a PHP function call

    Should this string be the return value of the PHP function?
    Or should it be embedded in the response HTML? Any examples?

    This is what I got so far:
    footer.mxml in Flex Builder 3:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="ts_request()">
    <mx:Script>
    <![CDATA[
    public function ts_request():void {
    timestampRequest.send();
    ]]>
    </mx:Script>
    <mx:Canvas width="836" height="36"
    backgroundColor="#05075C">
    <mx:Label id="timestamp"
    text="{timestampRequest.lastResult.timestamp}" color="#FEFEFE"
    height="20" y="10" textAlign="left" width="221" x="10"/>
    </mx:Canvas>
    <mx:HTTPService id="timestampRequest" url="
    http://www.ABC.com/timestamp.php"
    useProxy="false" method="POST" />
    </mx:Application>
    Here is the timestamp.php on the www.ABC.com web server. I
    have tested the php by directly access it with
    "www.ABC.com/timestamp.php" and it shows the timestamp correctly:
    <?php
    putenv($timezone);
    $Return = "<timestamp>".date("m/d/Y H:i:s", time())."
    CST"."</timestamp>";
    print($Return);
    ?>
    When I run footer.mxml in Flex 3 Builder, I got an error:
    This file cannot be launched.
    Where did I do wrong?

  • How can I send a parameter to a RFC function in c++ code (in eDM develop)?

    Hi,
    I am expanding Easy Document Management 6 SP14 via c++ code and I am trying to send a parameter value to a RFC function.
    I have succeeded calling a RFC function that requires no parameters.
    I have a pointer that points to the function, but I couldn't find a way to point to the parameter and send a value to it.
    I will appreciate any help (and code example if possible).
    Thanks,
    Eitam

    Hi guys,
    unfortunately I coulden't send parameters to RFC functions as you all described (get the message "This function is not yet implemented" when using Rfc->Field...), so I chose to follow SAP note 821930 which describes how to do something similar in ABAP code (I only need the selected document parameters).
    The problem is that in my code I open SAP gui (as I did in my c++ code: pRfc->InitFunction(L"MyRfcFunction",VARIANT_TRUE),
    but now I don't know how to send the connection parameters from easyDMS to my ABAP function that perform the "call transaction" method.
    my code:
    FUNCTION Z_EASYDMS_FUNCT_GET_LIST. (from note 821930)
    ""Local Interface:
    *" TABLES
    *" DOCUMENTS STRUCTURE BAPI_DOC_FILES2 OPTIONAL
    *" EXT_FUNCTIONS STRUCTURE ZEASYDMS_EXT_FUNC OPTIONAL
    ext_functions-functioncode = 'Z_MY_FUNCTION'.
    ext_functions-displayname = 'Add Doc To Project'.
    APPEND ext_functions TO ext_functions.
    ENDFUNCTION.
    FUNCTION z_easydms_funct_called. (from note 821930)
    ""Local Interface:
    *" IMPORTING
    *" VALUE(FUNCTIONCODE) LIKE SY-UCOMM OPTIONAL
    *" EXPORTING
    *" VALUE(RETURN) TYPE BAPIRET2
    *" TABLES
    *" DOCUMENTS STRUCTURE BAPI_DOC_FILES2 OPTIONAL
    IF functioncode = 'Z_MY_FUNCTION'.
    CALL FUNCTION 'Z_MY_FUNCTION'.
    ENDIF.
    ENDFUNCTION.
    FUNCTION Z_MY_FUNCTION.
    call transaction 'CJ20N'
    ENDFUNCTION.
    now nothing happens, but if I run first my old c++ code (from easyDMS context menu I choose what I've created in c++ which basically does "pRfc->InitFunction(L"MyRfcFunction",VARIANT_TRUE)" ) and then run the implementation above from the context menu it will work (the sap gui will open because it gets the connection parameters from the c++).
    Thanks for your help,
    Eitam

  • DLL interfacing with mixed value and reference types

    I'm currently trying to work with a supplied DLL.
    I have header files and all, and the DLL import wizard does a decent job of importing the DLL functions but there are some data types which simply can't be handled.
    The DLL requires usage of a data type which is a struct with value and reference data types.  I could theoretically replace the references with simple U32s but much of the required information in the data is in the data structures referenced by the pointers.
    How do I go about implementing this seeing how I need to be able to pass the data back into the DLL in its original form (value and reference types).
    I have something like the following:
    struct Item {
    Int Device,
    *Item Next
    *Item Previous
    *Data Datastruct
    I have downloaded the WDK from Microsoft, have CVI and Visual Studio 2008 available.  I'm not very experienced at this end of things...   I can deal with Structs with pure value types but how do I get at the data in the reference types?
    I strongly suspect I need a wrapper DLL, but how is the best way to go about this?
    Shane.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant
    Solved!
    Go to Solution.

    Hi Shane,
    To be honest, I don't understand why you have to pass the ENTIRE structue (if it's "Item" structure. The pointer to the next and the previous item should be held and manituplated in the DLL, doesn't it?
    Operate within classes....
    Are you talking about Labview Classes? I didn't use it yet. Sorry.
    Convert Linked List to Array You can't store all elements by value in a cluster, because it's kind of recursive. The next pointer leads to the same Item structure (with it's own next pointer. If it's a circulary-linked-list it will never stop)
    Or did you mean to store the pointers as a U32 value? That should work.
    Output the struct as a binary blob Yes, why not ! But that lets me assume you don't know the concrete "Datastructure" ?!
    I'm honest again I can't see the important information you mentioned if you pass the Data structure as a binary blob.
    Read-only is a very good idea. If you don't need to tweak the pointers in the list you should avoid it.
    Balze

  • ReportQuery on Integer Values

    Toplink seems to be inconsistent with SQL aggregate functions when running a report query on an integer field.
    My code is similar to this:
    // Toplink version 9.0.4.2
    ReportQuery report = new ReportQuery(Person.class);
    ExpressionBuilder builder =
    report.getExpressionBuilder();
    report.addAverage("id-ave",builder.get("id"));
    report.addMinimum("id-min",builder.get("id"));
    report.addMaximum("id-max",builder.get("id"));
    report.addStandardDeviation("id-std",builder.get("id"));
    report.addSum("id-sum",builder.get("id"));
    report.addVariance("id-var",builder.get("id"));
    results = session.executeQuery(toplinkQuery);
    After running a report, Toplink returns all of the requested values as java.lang.Integer types.
    This is not a problem for sum, min, and max, because these values should always be integers. But for average, variance, and standard deviation, floating point values are a likely result. The Toplink returned integer values are rounded down to the nearest whole number.
    Running the equivalent SQL on Oracle 9i returns floating point results. The SQL is something like
    SELECT AVG(ID), MIN(ID), MAX(ID), STDDEV(ID), SUM(ID), VARIANCE(ID) FROM PERSON
    Is this the defined behavoir of Toplink, or is it a bug? I haven't tried the SQL on different database vendors. Maybe the SQL executes differently for other vendors and Toplink chose integer values so that results would be consistent. But I have not seen any documentation indicating so.
    -J

    Yes this is an issue with ReportQuery, currently it tries to convert the values to their attribute type, but should not be doing so for these functions.
    I have logged this problem internally, but if you need a solution to the problem, please contact Oracle support.
    Workarounds would be:
    - In you DatabaseLogin turn off data-optimization, i.e. login.dontUseDataOptimization();
    - Use custom SQL with the report query, or a DataReadQuery.

  • Integer values and decimal values in weblient UI - Display mode

    Hello,
    i have developed an custom assignmentblock with some custom fields.
    Some of this fields are integer values and text values.
    Some other fields are decimal values.
    I face the issue that this decimal values are in display mode  right-aligned all other fields are left-aligned.
    In edit mode all values are right-alligned.
    How can i change this behaviour? All values left-alligned in display mode!
    Otherwise this looks strange.
    Thank you
    Kind regards
    Manfred

    Hi,
    Decimal values will be displayed right-aligned. To change that you need to modify the GET_M method.
    In get_m method, you have to change the attr datatype to string.
    Data: attr type string.
    Data: dref type ref to data.
    Get reference of attr into dref.
    Regards,
    Arun
    Edited by: Arun Kumar on May 14, 2010 3:03 PM

Maybe you are looking for

  • What's the deal with the video format?

    Hello! What is the deal with the video format? Does it mean I have to code the videos for 640*480 ? It won't accept any other size? What size do I need to select for widescreen format? With Quicktime pro I've been able to encode videos with a very ni

  • "run" "script" "my", what are the rules for using different handlers?

    Hi I am a very big newbie to this apple script, and I am getting confused how to organize my scripts with functions such as "my" "script" "run".  Please send me a tutorial! DOUG

  • How can I save photos and free up space in iPhoto?

    I have a hard drive that used to be used on a PC. It's format is MS-DOS (FAT32). I've been using it for the past year with my Mac with no issue (moving files onto it and off of it). I have over 30,000 photos in iPhoto now and am noticing that it's qu

  • Power Source Help

    My Kt333 Ultra is doing fine. Excelent Mobo. Since installed PCAlert, randomly get warnings because of 12 v. limit beeing surpassed to 13.1 v. No problem with temp. Was wondering if is possible to put a resist. in 12 v. out line to assure the 12 v li

  • MIRO unplanned delivery cost -- to seperate a/c

    Hi ,, This is regarding Unplanned delivery cost In config we selected Unplanned delivery cost post to separate account Business Scenario: There are 5 different unplanned costs and each must be directed to separate a/c . At the moment in legacy system