Mathscript Array -problem

Dear Friends,
I am reading the serial port data data , byte by byte..I used serial port vi and math-script in it ....
And these  serial data are sent in a format like below........
format:  HEADER ,  MSB  , DATA ,  CHECKSUM..
I need to collect these bytes and plot it on the graph.. I have problem with saving these data in an array and processing it....
below is the code,which i had written to do the process
 persistent  ubIndex = 0
 persistent  bHeader = 0
ubTemp=input
 if bHeader ==0
                 if ubTemp == 89
                        ubIndex= 0
                        bHeader = 1                              
                   end
else
              ubIndex= ubIndex +1
              ubReceivedata(ubIndex) = ubTemp      
               if  ubIndex == 3
                       ubIndex = 0
                       bHeader = 0               
                 end
end      
 ubChecksum = ubRecieveData(1) + ubRecieveData(2) + ubRecieveData(3)
if   ubChecksum == 0
               if ubRecieveData(1) == 76
                        duLen1 = ubRecieveData(2)
                             elseif   ubRecieveData(1) == 69
                                    duLen2 = ubRecieveData(2)
                             elseif   ubRecieveData(1) == 78
                                       duLen3 = ubRecieveData(2)
                               elseif ubRecieveData(1) == 71
                                            duLen4 = ubRecieveData(2)
                                            duLength = duLen1 * 16777216 + duLen2 * 65536 + uwLen3 * 256 +  ubLen4 
                              elseif   ubRecieveData(1) == 80
                                           uwTemp1 = ubRecieveData(2);
                               elseif  ubRecieveData(1) == 66
                                            ubTemp2 = ubRecieveData(2);                 
                                            uwpackageSpeed = uwTemp1 * 256 + ubTemp2;
                                 elseif  ubRecieveData(1) == 68
                                          uwTemp1 = ubRecieveData(2);
                                 else  ubRecieveData(1) == 65
                                          ubTemp2 = ubRecieveData(2);                 
                                         uwDrumSpeed = uwTemp1 * 256 + ubTemp2;
                   end
end
In the above program,i collected 2nd, 3rd,4th byte in the ubRecieveData array  and i left the 1st byte(which is header)...
and I find the checksum by adding the 2nd,3rd,4th byte to find whether it is zero or not,
if it is zero ,then the received bytes are correct...and it will proceed to take only the data bytes...and i will plot it on the chart...
I have a doubt in the ubrecievedata array..whether it is collecting the 3 bytes data or not......whether array  get's initliazed every time in the script..
since it doesn't get in to the if-loop checksum and loop further.....
I even removed the if-loop checksum ,to collect and process the data inside the loop below if-loop checksum..but it's not working ...
will the above script are correct..... .....?suggest some solutions to get working
i attached my  program vi..for u to get feel of my problem...
regards
rajasekar
Attachments:
vjnewsamp.vi ‏319 KB

Hi Grant,
I did as u told u,still unable to process the data and plot it on the chart.....
I attached my program  testing20.vi ....for finding the problem..
could u please see the vi..and suggest some solutions....
As u said  the array should also be persistent.....and my doubt is the other variable like dulen1,dulen2,dulen3,dulen4,...should also be persistent...in order to calculate the parameter
duLength,.......similarly the parameter uwpackagespeed and uwdrumspeed should be persistent.(in my point of view....)
objective of the program is to read the serial port byte and byte ...and plotting it
And the byte are sent in format like
format: Header , MSB ,data,checksum..
             Header, LSB ,data,checksum..
so i need to recogize this format in my mathscript node ...the main thing is ,...... in 4 bytes the data is only of 1byte....
In my program , i am plotting length(x-axis) versus packagespeed and drumspeed(y-axis)..
here the length parameter itself 4 byte of data.....i have to collect it byte by byte of data ,...from the 4 byte format(math script gets called 16 times to collect these 4 data bytes
 from 4 byte format)...        and packagespeed and drumspeed is of 2 byte.......
if u have any questions please ask me...
Eagerly awaiting for ur reply....
Regards
rajasekar
Attachments:
testing21.vi ‏442 KB

Similar Messages

  • A quick Array Problem

    hey all,
    i'm having a dumb array problem, I cannot figure out what I've done wrong !
    I've set up an empty array of JButtons (because that '4' is actually a variable in my code)
    HERE IS THE CODE
    //===========================
    JButton[] buttons = new JButton[4] ;
    for (int g = 0; g < 4; g++)
    Imag[g].setIcon(imageIcons[g]);     
    buttons[g].setEnabled(true);
    System.out.print (buttons[g] + " " + g + "\n");
    //===========================
    My Error is a null pointer exception. And when I take out the:
    buttons[g].setEnabled(true);
    line, I just get the ouput, and it is:
    null 0
    null 1
    null 2
    null 3
    Ok, I know I'm probably making one dumb little mistake, but I have no idea what it is right now, Please Help !! thanks,
    Kngus

    When you want to use an array, you declare it (which you did), construct it (which you did), and initialize it (which the VM did). When you initialize an array of primitives, the primitives get their default value (0 for signed int types, 0.0 for float types, false for boolean, null-character for char) and so do object references (null).
    You are setting up an array of object references. When the VM initializes it, the elements of the array (i.e. the references to the JButtons) are set to null. That's why you're getting the NullPointerException. You need additional code, something along the lines of this:
    for(int j = 0; j < buttons.length(); j++) {
        buttons[j] = new JButton();
    }Now, your buttons array will contain references to JButtons rather than null.
    AG

  • Transposin​g Array Problem

    I need to get the information from a table which has been populated at an earlier point in the program, and convert it to numbers, and then break it up into its individual elements. Both ways of doing this in my attached vi work, but the one method throws three 0's in between columns, when I resize the 2D array to 1D. Any idea why? Is there an easier way to go about this?
    Thanks, Geoff
    Attachments:
    Array Problem.vi ‏26 KB

    Your original table contains 3 extra row which generate 3 rows of zeroes. Your 2D array actually contains 35 elements. the reshape function truncates to 20 elements. After transposing, you throw away nonzero elements while before rehshaping all zeroes are in the tail giving the false apperance of correct behavior.
    The attached modification gives you a button to fix the table size so it works correctly.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ArrayProblemMOD.vi ‏41 KB

  • Mathscript Array

    Hello,
    I wanna use the counter in my While Loop to acces the values of my vector/array inside the Mathscript. However, I get this message error:
    "Error -90026 occurred at Error in function V at line 1:  The indexes for a matrix indexing operation must be real, positive integers."
    Also, the counter is an integer, so I don't have a clueof what is the problem. I will attach my VI so I can make myself more clear. Thanks in advanced.
    Yours sincerly,
    Guilherme Garber
    Attachments:
    Mathscript_vector array.vi ‏23 KB

    Hello,
    The issue lies in the fact that LabVIEW uses 0-based indexing for arrays and MathScript uses 1-based indexing. The integer counter you reference is indeed an integer, but it starts at 0. Since 0 is not a positive integer (and also out of bounds for array indexing in MathScript), you see the error message.
    Grant M.
    Senior Software Engineer | LabVIEW Tablets | National Instruments

  • Merging labview and mathscript array question tia sal2

    Greetings,
    I really like mathscript functionality it’s just taking a
    while to learn how to merge labview and mathscript together.  I can get an XY graph out which plots the
    correct wave function (thanks to the forums help) the problem is going from 1-D
    Array of cluster 2 elements to 1-D of waveform Double so I can get a sound representation
    of the waveform. 
    Anyone have any suggestions.
    Tia sal2
    Attachments:
    mathscript formula to sound with waveform graph.vi ‏248 KB

    Sorry not sure what happened internet gremlins maybe...here's the vi and graphic image
    Second try Hopefully this will work
    Attachments:
    mathscript formula waveform graph.vi ‏1 KB
    image_of_mathscript_to_labview.jpg ‏108 KB

  • MS Office Report Express VI and Array Problem

    Hello all,
    I have a strange issue with the MS Office Report VI that's included with the Report Generation Toolkit. I created an Excel template which I linked using the "Custom template for Excel" preference and applied all the named ranges. However, two of the named ranges that I am inputting are 1D Arrays of doubles. Now the problem:
    When I input the arrays to their specific name range (it's only 6 values), instead of inputting just the array values into the cells, it inputs like this:
    0    Value
    1    Value
    2    Value
    6    Value
    It pushes the "Value" to the column next to the name range because of the 0-6.
    It does this with both arrays so it screws up all the formulas. Any one know how to remove the 0-6 and just input the values?
    Thanks all 
    Solved!
    Go to Solution.

    Greetings, I wrote a program that generates an array of data and stores a data table, just as a chart, just starting to program, I hope that my program can be useful
    Atom
    Certified LabVIEW Associate Developer
    Attachments:
    write_excel.vi ‏60 KB

  • Assigning value to a two-dimensional byte array - problem or not?

    I am facing a really strange issue.
    I have a 2D byte array of 10 rows and a byte array of some audio bytes:
    byte[][] buf = new byte[10][];
    byte[] a = ~ some bytes read from an audio streamWhen I assign like this:
    for (int i=0; i<10; i++) {
        a = ~read some audio bytes // this method properly returns a byte[]
        buf[i] = a;
    }the assignment is not working!!!
    If I use this:
    for (int i=0; i<10; i++) {
        a = ~read some audio bytes
        for (int j=0; j<a.length; j++) {
            buf[i][j] = a[j];
    }or this:
    for (int i=0; i<10; i++) {
        System.arraycopy(a, 0, buf, 0, a.length);
    }everything works fine, which is really odd!!
    I use this type of value assignment for the first time in byte arrays.
    However, I never had the same problem with integers, where the problem does not appear:int[] a = new int[] {1, 2, 3, 4, 5};
    int[][] b = new int[3][5];
    for (int i=0; i<3; i++) {
    b[i] = a;
    // This works fineAnybody has a clue about what's happening?
    Is it a Java issue or a programmers mistake?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Back again! I'm trying to track down the problem.
    Here is most of my actual code to get a better idea.
    private void test() {
         byte[][] buf1 = new byte[11][];
         byte[][] buf2 = new byte[11][];
         AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(audioFile);
         byte[] audioBytes = new byte[100];
         int serialNumber = 0;
         while (audioInputStream.read(audioBytes) != -1) {
              if (serialNumber == 10) {
                   serialNumber = 0; // breakpoint here for debugging
              // Fill buf1 -- working
              for (int i=0; i<audioBytes.length; i++) {
                   buf1[serialNumber] = audioBytes[i];
              // Fill buf2 -- not working
              buf2[serialNumber] = new byte[audioBytes.length];
              buf2[serialNumber] = audioBytes;
              serialNumber++;
    }I debugged the program, using a debug point after taking 10 "groups" of byte arrays (audioBytes) from the audio file.
    The result (as also indicated later by the audio output) is this:
    At the debug point the values of buf1's elements change in every loop, while buf2's remain unchanged, always having the initial value of audioBytes!
    It's really strange and annoying. These are the debugging results for the  [first|http://eevoskos.googlepages.com/loop1.jpg] ,  [second|http://eevoskos.googlepages.com/loop2.jpg]  and  [third|http://eevoskos.googlepages.com/loop3.jpg]  loop.
    I really can't see any mistake in the code.
    Could it be a Netbeans 6.1 bug or something?
    The problem appears both with jdk 5 or 6.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • RAID 5 array problem

    Hi,
    I've a problem arising from the replacement of a drive in a Proliant ML370 G3 RAID 5 array.
    What happened is one disc in the array failed. I replaced it and selected the "F1" rebuild option. The system then appeared to start the rebuild, both the green arrow and the green HD icon on the replaced disc flashing. However, when I returned to the server, over a week later, I found that the HD light had gone out but the green arrow continued to flash on occasion. I had expected the HD icon to remain illuminated and the arrow to flash every so often. When I checked in Disc Manager (Windows 2003 Server) this reported that although both partitions allocated to the array were healthy, there was no fault tolerance. I have since rebooted the server which then responded that the same disc had failed and presented me with a rebuild option.
    I've now tried to rebuild this array three times without success, the result being the same each time I try. What am I missing?
    I'd appreciate any suggestions
    Phil

    You gave a very nicely detailed list of datum ... thanks, that's rare!
    Now ... one other bit ... you mention media being on the Thunderbolt RAID5 ... is everything there, including cache/database/previews/project-file, or just the media? I know that if say everything else was on the system drive, this would probably happen ... the media is the 'easiest' part of the disc-in/out chain as it's mostly "simple" reading of files, those other things are heavy read/write items. I'm assuming you've probably put most of it on that RAID, as the folks on the Tweaker's Page would oft posit.
    Neil

  • Associative Array problem in Oracle Procedure

    Hi,
    I've searched through the internet and this forum and haven't been able to resolve a problem using associative array values within an IN clause. Everything I've read states that I can't use the associative array directly in the SQL statement. I have to convert it to a table and then I can use it. Unfortunately, I'm receiving an "ORA-21700: object does not exist or is marked for delete" error when trying to access the table I've populated from the array. Please note that I have verified the table is actually being populated during the loop. I'm catching the error when referencing it in the SELECT statement.
    I've declared the following in the ARCHIVE package specification:
    TYPE RSType IS REF CURSOR;
    TYPE integer_aat IS TABLE OF INTEGER INDEX BY PLS_INTEGER;
    TYPE integer_table IS TABLE OF INTEGER;
    The procedure is as follows:
    PROCEDURE SEL_SEARCH_RESULTS (v_term IN VARCHAR2,
    v_categories IN ARCHIVE.integer_aat,
    rs OUT RSType)
    AS
    /* PURPOSE: Return Search Results for the Category and Keyword Provided
    VARIABLES:
    v_categories = Document Categories array
    v_term = Keyword entered
    rs = Result Set
    tbl_cat ARCHIVE.integer_table := ARCHIVE.integer_table();
    BEGIN
    FOR i IN 1 .. v_categories.COUNT
    LOOP
    tbl_cat.EXTEND(1);
    tbl_cat(i) := v_categories(i);
    END LOOP;
    OPEN rs FOR
    SELECT A.ID,
    B.CATEGORY,
    A.FILENAME,
    A.DISPLAY_NAME,
    A.COMMENTS
    FROM TBL_ARCHIVE_DOCUMENTS A,
    TBL_ARCHIVE_DOC_CAT B,
    TBL_ARCHIVE_DOC_KEYWORDS C
    WHERE A.ID = B.ID
    AND A.ID = C.ID
    AND B.CATEGORY IN (SELECT * FROM TABLE(tbl_cat))
    AND C.KEYWORD = v_term
    ORDER BY A.ID;
    END SEL_SEARCH_RESULTS;
    Any help would be greatly appreciated and thanks in advance,
    Matt

    Thank you for the quick response. I looked at the example you suggested and made the following changes. Now I'm receiving an "Invalid datatype" error on the "SELECT column_value FROM TABLE(CAST(tbl_cat AS tbl_integer))" statement. I must be missing something simple and I just can't put my finger on it.
    PROCEDURE SEL_SEARCH_RESULTS (v_term IN VARCHAR2,
    v_categories IN ARCHIVE.integer_aat,
    rs OUT RSType)
    AS
    /* PURPOSE: Return Search Results for the Category and Keyword Provided
    VARIABLES:
    v_categories = Document Categories array entered
    v_term = Keyword entered
    rs = Result Set
    TYPE tbl_integer IS TABLE OF INTEGER;
    tbl_cat tbl_integer;
    BEGIN
    FOR i IN 1 .. v_categories.COUNT
    LOOP
    tbl_cat.EXTEND(1);
    tbl_cat(i) := v_categories(i);
    END LOOP;
    OPEN rs FOR
    SELECT A.ID,
    B.CATEGORY,
    A.FILENAME,
    A.DISPLAY_NAME,
    A.COMMENTS
    FROM TBL_ARCHIVE_DOCUMENTS A,
    TBL_ARCHIVE_DOC_CAT B,
    TBL_ARCHIVE_DOC_KEYWORDS C
    WHERE A.ID = B.ID
    AND A.ID = C.ID
    AND B.CATEGORY IN (SELECT column_value FROM TABLE(CAST(tbl_cat AS tbl_integer)))
    AND C.KEYWORD = v_term
    ORDER BY A.ID;
    END SEL_SEARCH_RESULTS;

  • Converting bytes to character array problem

    I am trying to convert a byte array into a character array, however no matter which Character Set i choose i am always getting the '?' character for some of the bytes which means that it was unable to convert the byte to a character.
    What i want is very simple. i.e. map the byte array to its Extended ASCII format which actually is no change in the bit represtation of the actual byte. But i cannot seem to do this in java.
    Does anyone have any idea how to get around this problem?

    Thanks for responding.
    I have however arrived at a solution. A little un-elegant but it seems to do the job.
    I am converting each byte into char manually by this algorithm:
              for (int i=0;i<compressedDataLength;i++)
                   if (((int) output)<0)
                        k=(127-((int) output[i]));
                        outputChr[i]=((char) k);
                   else
                        k=((int) output[i]);
                        outputChr[i]=((char) k);
                   System.out.println(k);
    where output is the byte array and outputChr is the character array

  • Array problem (empty).

    Hi everybody,
    I'm using Crystal X and I have the following query
    IdField          Field1             Field2
    1                  CCC                8
    1                  GGG               3
    1                  DDD                2
    2                  AAA                7
    I want the following output
    IdField
    1               CCC GGG DDD    Field2 define different format to Field1 (different background color)
    2               AAA
    My report is grouped by IdField. As the output for Field1 has a different format depending on Field2. I want to write the Field1+Field2 values for each IdField in an Array, I have the following formulas, but the array looks empty, I have changed the array declaration as global and still is empty
    Section: ReportHeader
    Formula InitArray
                 shared stringvar Array DataArray;
                 redim DataArray[30];
    Section: Details (Suppresed)
    Formula AddDataToArray
                shared numbervar iCounter;
                shared stringvar Array DataArray;
                iCounter := iCounter + 1;
                DataArray[iCounter] := {Command.Field1} + "-" +  {Command.Field2};                                             
    Section: Footer Group1a
    Formulla FillTextFromArray
                shared numbervar sDataVal;
                shared stringvar Array DataArray;
                sDataVal := DataArray[1];  //DataArray[1] shoud be = "CCC-8"
                left(sDataVal, len(sDataVal)-2);
                {@DisplayData1}= DataArray[1]; //This is my problem the array is empty
    Section: Footer Group1b
    Display the following data
    IdField     @DisplayData1  @DisplayData2  @DisplayData3 ...
    I added 50 formulas to display each Field1 value with different formats. I know these columns are fixed, but I coudn't find any other way.
    I have 3 question:
    ??? What is wrong on my array than in formula "FillTextFromArray" is empty???
    ??? Is there another way to refence a formula or a text object different than FormulaName or TextObjectName???, like an object array or something, because I will be dealing with 50 formulas to write the value and to change the format
    ??? How to make reference to a text object, in case I would change the 50 formulas by 50 text objects
    Please help with any of the 3 questions or any ideas to make the report
    thanks
    cc

    You can try another way like
    create anew formula @Initialize
    whileprintingrecords;
    stringvar str:="";
    Now place this in group header of IDField
    Now Create another formula @Evaluate
    whileprintingrecords;
    stringvar str;
    str:=str" ";
    Place this in detail section
    Create another formula like @Display
    whileprintingrecords;
    stringvar str;
    place this in group footer of IDFIeld and right click on this formula and go to format field and check the option "can grow".
    Now you can suppress the sections group header and details section to show the values in a single line in each group footer.
    Hope this helps!
    Raghavendra

  • Datagrid Array Problem

    Hello to everyone who reads this. I've been on the forums
    over the past few days trying to track down my issue, but I cant
    seem to nail it down. I was hoping someone would have the time to
    help me out.
    Problem is this: Play list editor what all the information is
    stored in a mysql database. retrieving the information and passing
    it to flex and working with it in data grids has been relatively
    smooth. The problem happens when I attempt to drag files onto the
    playlist. It seems the information being passed is an array 'items'
    as it states in the docs, but in each array is xml associated with
    the file.
    ex:
    <file>
    <FK_File>752</FK_File>
    <filename>01 Summertime.mp3</filename>
    <filePath>/home/public/data/audio/Internal HDD-CORE
    (sda1) [42]/Various Artists/Summertime</filePath>
    <pic>
    http://dcerouter/pluto-admin/mediapics/5153_tn.jpg</pic>
    <Title>Summertime</Title>
    <genre PK_Attribute="73">Funk</genre>
    <performer PK_Attribute="308">Ohio
    Players</performer>
    <ReleaseDate
    PK_Attribute="229">2005</ReleaseDate>
    <Album PK_Attribute="311">Summertime</Album>
    <Track PK_Attribute="72">1</Track>
    </file>
    <file>
    <FK_File>1426</FK_File>
    <filename>02 Fantasy.mp3</filename>
    <filePath>/home/public/data/audio/Internal HDD-CORE
    (sda1) [42]/Earth, Wind &amp; Fire/Earth Wind &amp;
    Fire</filePath>
    <pic>
    http://dcerouter/pluto-admin/mediapics/270_tn.jpg</pic>
    <Title>Fantasy</Title>
    <genre PK_Attribute="73">Funk</genre>
    <performer PK_Attribute="762">Earth Wind &amp;amp;
    Fire</performer>
    <ReleaseDate
    PK_Attribute="765">1978</ReleaseDate>
    <Album PK_Attribute="766">Earth Wind &amp;amp;
    Fire</Album>
    <Track PK_Attribute="151">2</Track>
    </file>
    <file>
    <FK_File>1974</FK_File>
    <filename>02 Give Up The Funk (Tear The Roof Off The
    Sucker).mp3</filename>
    <filePath>/home/public/data/audio/Internal HDD-CORE
    (sda1) [42]/Parliament/Tear The Roof Off 1974-1980 (Disc
    2)</filePath>
    <pic>
    http://dcerouter/pluto-admin/mediapics/_tn.jpg</pic>
    <Title>Give Up The Funk (Tear The Roof Off The
    Sucker)</Title>
    <genre PK_Attribute="73">Funk</genre>
    <performer
    PK_Attribute="1150">Parliament</performer>
    <ReleaseDate
    PK_Attribute="731">1976</ReleaseDate>
    <Album PK_Attribute="1153">Tear The Roof Off 1974-1980
    (Disc 2)</Album>
    <Track PK_Attribute="151">2</Track>
    </file>
    Im assuming the comma separation from each child 'file',
    denotes the items are stored as an array. i don't know if i should
    attempt to send them back to php for processing of if im doing
    something wrong to begin with that the data comes out that way.
    Thanks in advance for any responses or insights.

    I'm not sure there is a proper way to do anything ( who
    decides this anyhow :) ) ....I guess it depends on what your doing
    and how efficient it is and whether it needs to scale to a massive
    system or not..otherwise if it works ...it works !
    I dont actually use php on the server side, i use java remote
    objects. and they return java collections...which i then cast to
    arraycollection in flex and access it that way...I'm not sure what
    the php equivalent is, some sort of array (cohesive ??) as you
    mentioned. I really like the way java and flex co-exist on the
    server & client. If i make a .as class for an object in flex, I
    then make the equivalent java class on the server so I can store it
    in the DB
    and do the CRUD stuff. I use keys a lot too, so i find my
    datagrids in flex often need itemrenderers / comboboxes to be able
    to choose the key values as options , so the combo items come
    straight out the DB too..anyway you get the gist..it sounds like
    your doing similar. I have done a little php before and I really
    liked how little code was required to do stuff. I think for me,
    I've done a bit of java before so its easier just to stay with what
    you know..glad you sorted it out yourself too.

  • Insert element into array problem

    Hi,
    I have problem about how to insert value into an array. here is one section, could anyone help me to insert input value into array and delete the first value in the array. Gap means to fill in code
    void Ins(String name)
    // Insert name or increment its multiplicity.
    // If the bag is full remove the oldest entry.
    int i; // Running index on BagName
    int target; // if target < n then name.equals(BagName[target]);
    // else target == n
    Date EntryDate; // Current date and time
    // Get current date and time
    EntryDate = new Date();
    BagDate[n] = EntryDate.toString();
    Mult[n] = n+1;
    BagName[n] = name;
    n++;
    // Search bag for name
    // Gap 2
    // Assertion: target < n => name.equals(BagName[target])
    // else target == n
    // Update Mult if target < n
    // Gap 3
    // Make room for and insert name if target not found
    } // Ins(String name)
    Message was edited by:
    sibojava
    Message was edited by:
    sibojava

    Do you have several accounts?
    See this thread, it's the same question:
    http://forum.java.sun.com/thread.jspa?threadID=5143232
    Kaj

  • Array problem populating advancedDataGrid

    I originally thought this was an error on the coldfusion side, so I started a thread here where I was given a lot of help: http://forums.adobe.com/thread/463777
    However I have found the data to be valid coming from coldfusion.
    To sum the problem up; I'm populating an advancedDataGrid from a remoteObject call to a cfc. The data coming out of the cfc looks fine (an array of Name and Value fields), however once I get to the ResultEvent for the remoteObject method, the data seems to have changed.
    Instead of ResultEvent.result being an array with Name, Value fields, it is instead Name, then an array called Value containing one element (the value!).
    I was working around this error, but now I'm looking for a fix.
    Thanks.

    The error message should have a line number associated with it. Look at that line in your source code. That will help you determine what it wrong.
    If you can't figure it out still, repost to the forum, but next time include the error message, and format your source code properly (see http://forum.java.sun.com/faq.jsp#messageformat). Also indicate what line of your source code are the ones mentioned by the error message. But try to figure it out for yourself first or you'll never learn.

  • Array problem

    Small question about arrays:
    See attatched problem.vi. How can I add the values to the array, not only change the value at index 0 each time I press the button.
    Attachments:
    problem.vi ‏11 KB

    Hi Christian,
    here u are!
    In the attached VI, just see how i am insertig new elements into an array
    Use either Build array or insert into array
    Use build arrays for large arrays with care,  as it will load ur memory
    Regards
    Dev
    Message Edited by devchander on 12-16-2005 03:24 AM
    Message Edited by devchander on 12-16-2005 03:27 AM
    Attachments:
    problem[1].vi ‏31 KB

Maybe you are looking for