Subroutine that takes in an array, fills it in and then spits it back out.

I'm looking for an example where I can create a generic subroutine that takes in an array and then operates on it and then spits the entire array back out. I'm pretty sure this is simple, but I just can't figure it out... In essence I want this:
main {
array bob = something
process_array(bob) /* this part takes in bob...does some stuff and then spits the modified bob back out */
....now go on with the rest of my program...
process_array {
/* this does something to the array bob */
I'd appreciate any help. The syntax is just killing me. I can already write the code to do the manipulations for each specific array. Basically I'm reading a csv file and putting it into an array. I would like to write a subroutine that will do this for whatever file and array I give it.
Thanks
Edited by: nukular on May 20, 2008 3:19 PM

nukular wrote:
process_array(bob) /* this part takes in bob...does some stuff and then spits the modified bob back out */You either want the method to return nothing or you would want this:
array ted = process_array(bob);Not much point in returning the array reference if you do not keep it.

Similar Messages

  • I have an editable pdf made in Acrobat. Viewing it Adobe Reader Mobile (Android) and I can fill it fine. I want to be able to fill the form but it keeps autosaving. I just want to email the form and then it goes back to an unfilled form. How do i do that?

    I have an editable pdf made in Acrobat. Viewing it Adobe Reader Mobile (Android) and I can fill it fine. I want to be able to fill the form but it keeps autosaving. I just want to email the form and then it goes back to an unfilled form. How do i do that?

    Currently, Adobe Reader for Android does not provide an option to disable auto-save.
    In the Reader home screen (where your files are displayed), you can make a copy of the original PDF document, open the copy (instead of opening the original document), make changes to the copy.  Once you email the copy, you can delete it.
    For more information, please see Help > How To... > Copy, edit, delete, manage.
    Although it is not the most convenient way to accomplish the task, that's the only feasible workaround that is available in Adobe Reader for Android right now.

  • Hi I got an email from itunes saying that my pre order was ready and when I click on the link from my ipad it takes me to the itunes store app and then it doesn't do anything help with this please.

    Hi I got an email from itunes saying that my pre order was ready and when I click on the link from my ipad it takes me to the itunes store app and then it doesn't do anything help with this please .
    <Link Edited By Host>

    Thanks for your advice, I went to the apple shop today for a face to face meeting with a tech and he checked everything and could not figure out why I was having this problem so we decided to give up on that account and create a whole new one for me using a different email address.
    Now I can download apps on both my iPhone and ipad2.
    If anyone is reading this in Brisbane Australia go to the Chermside apple shop and ask for Wade. He was fantastic!
    Jan

  • How long does it take to get approval from iTunes Connect and how do I find out if they are working on it?

    How long does it take to get approval from iTunes Connect and how do I find out if they are even working on it? I'm not really sure if my application was even delivered - from the links in IBA. Any suggestions how one might push the right buttons at Apple?
    Also went around in a big circle trying to get beyond the confusion of not having the right Apple ID when I've had it a long time. Confusion abounds and learning this forum also takes a new degree of patience. Humbling to say the least :-)
    Anyone been there done that?

    [email protected]
    [email protected]
    …support phone number call +1 (877) 206-2092.
    Global Phone Support
    We have expanded English-language publisher phone support. To make contacting the iBookstore support even easier, new local phone numbers are now available for Australia, France, Germany, Italy, Netherlands, Spain, and the U.K. Support is available Monday to Friday, from 7 a.m. to 5 p.m. (PT).
    Country
    Phone Number
    Australia
    1300 307 504
    Note that this is a low tariff number.
    France
    0805 540 117
    Germany
    0800 664 5307
    Italy
    800 915 902
    Netherlands
    0800 0201 578
    Spain
    900 812 687
    U.K.
    0800 975 0615
    U.S.
    +1 (877) 206-2092
    Toll-free from U.S. and Canada.

  • When I am filling a form and have to go back a page the stuff I have inserted disappears. Someone told me to set "PRESERVE FORMS" in my browser. I looked but di

    When I am filling a form and have to go back a page the stuff I have inserted disappears. Someone told me to set "PRESERVE FORMS" in my browser. I looked but did not find any likely adjustment. I have been in the habit pg taking a screen snip of my form details, but this is clumsy.
    I received was:
    " Enable Preserve Form Contents for your web browser. It's located in
    different places for different browsers, and it should be enabled by
    default. I'm guess it's not enabled on your system. It will keep all the
    fields intact in a form such as the e-mail page if you have to click on Back. "

    If possible then try to open that page in a new tab via a middle-click or Ctrl and left-click to avoid losing the current form.
    Note that you can hold down the left mouse button on the toolbar Back button to open the tab history menu and that you can middle-click an entry to open that page in a new tab.

  • When I try to make a new video, a window comes up that says,"The operation could not be completed," and then under it, it says,"No other information is available about the problem," what is happening and how do I fix it?

    when I try to make a new video, a window comes up that says,"The operation could not be completed," and then under it, it says,"No other information is available about the problem," what is happening and how do I fix it?

    Hi
    And without info - it's near to impossibly to help. Try my general troubleshooting note:
    Troubleshooting note
    When iMovie doesn't work as intended this can be due to a lot of reasons
    iMovie Pref files got corrupted - trash it/they and iMovie makes new and error free one's
    problem in iMovie Cache folder - trash Cache.mov and Cache.plist
    Creating a new User-Account and log into this
    This forces iMovie to create all pref. and cache files new and error free
    Event or Project got corrupted - try to make a copy and repair
    a Codec is used that doesn't work (even though iMovie and/or iDVD tries to / they fail in the end)
    version miss match of QuickTime Player / iMovie / iDVD
    preferences are wrong - Repair Preferences
    other hard disk problem - Repair Hard Disk (Disk Util tool - but start Mac from ext HD or DVD)
    External hard disks - MUST BE - Mac OS Extended (hfs) formatted to work with Video
    ( UNIX/DOS/FAT32/Mac OS Exchange - works for most other things - but not for Video )
    USB-flash-memories - usually do not work
    Net-work connected hard disks - usually do not work (most often not fast enough and WRONGLY FORMATTES as DOS etc)
    iPhoto Library got problems - let iPhoto select another one or repair it. Re-build this first then try to re-start iMovie. When iMovie starts-up it first look trough this iPhoto library and if faulty it all Halt’s.
    This You do by
    First -  close iPhoto
    Secondly - on start up of iPhoto - Keep {cmd and alt-keys down}
    Thirdly - now select all five options presented
    THEN - WAIT a long long time (>20 hours are not strange)
    free space on Start-Up (Mac OS) hard disk to low (<1Gb) - I never go under 25Gb free space for SD-Video (4-5 times more for HD)
    external devices interferes - turn off Mac - disconnect all of them and - Start up again and re-try
    GarageBand fix - start GB - play a few notes - Close it again and now try iMovie
    Screen must be set to million-colors
    Third-party plug-ins doesn't work OK
    Run "Cache Out X", clear out all caches and restarts the Mac
    Let Your Mac be turned on during one night. At about midnight there is a set of maintenance programs that runs and tidying up. This might help
    Turn off Your Mac - and disconnect Mains - for about 20-30 minutes - at least this resets the FireWire port.
    In QuickTime - DivX, 3ivx codec, Flip4Mac, Perian etc - might be problematic - temporarily move them out and re-try
    (I deleted the file "3ivxVideoCodec.component" located in Mac HD/Library/Quicktime and this resolved my issue.)
    buenrodri wrote
    I solved the problem by removing the file: 3ivxVideoCodec.component. after that, up-dated iMovie runs ok.
    Last resort: Trash all of iMovie and re-install it
    Yours Bengt W

  • How do you make an array of image icons and then call them?

    How do you make an array of image icons and then call them, i have searched all over the internet for making an array of icons, but i have
    found nothing. Below is my attempt at making an array of icons, but i cant seem to make it work. Basically, i want the image to match the value of the roll of the dice (rollVal)
    Any help would be greatly appreciated, some code or link to tuturial, ect.
    /** DiceRoller.java
    * Roll, print, Gui
    import javax.swing.*;
    public class DiceRoller extends JFrame
         private ImageIcon[] image  ;
         public String[] images = { "empty", "dice1.jpg",
                   "dice2.jpg", "dice3.jpg", "dice4.jpg",
                   "dice5.jpg", "dice6.jpg" };
         public Dice die;
         private int rollVal;
         public int rollNum;
         private JLabel j1;
         public DiceRoller(){
              j1= new JLabel("");
           die =new Dice();
           int rollVal;
           rollVal = die.roll();     
           image = new  ImageIcon[images.length];
         for(int i = 0; i < images.length; i++){
          image[i] = new ImageIcon(images);
         if (image!=null){
              j1.setIcon(image[rollVal]);
         System.out.println("Roll = "+die.roll());

    Demo:
    import java.awt.*;
    import java.net.*;
    import javax.swing.*;
    public class IconExample {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable(){
                public void run() {
                    launch();
        static void launch() {
            try {
                Icon[] icons = new Icon[6];
                for(int i=0; i<icons.length; ++i) {
                    String url = "http://www.eureka-puzzle.be/cast/images/dice" + (i + 1) + ".jpg";
                    icons[i] = new ImageIcon(new URL(url));
                display(icons);
            } catch (MalformedURLException e) {
                throw new RuntimeException(e);
        static void display(Icon[] icons) {
            JPanel cp = new JPanel();
            for(Icon icon : icons) {
                cp.add(new JLabel(icon));
            JFrame f = new JFrame();
            f.setContentPane(cp);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • I just got the 5s, every time in try to update my apps it's asking for a second password to an Apple ID that is not mine-- it asks for mine and then another one pops up after I enter mine .what do I do?

    I just got the 5s, every time in try to update my apps it's asking for a second password to an Apple ID that is not mine-- it asks for mine and then another one pops up after I enter mine .what do I do?

    where did you get this phone from

  • If someone trying to call me on there first attempt they can hear that it's busy even if its not and then on 2nd trial it's fine. Or stay busy for an hour or the call failed ,How can I fix it.? iPhone 5, iOS 7.0.4

    If someone trying to call me on there first attempt they can hear that it's busy even if its not and then on 2nd trial it's fine. How can I fix it.?
    iPhone 5, iOS 7.0.4

    Contact the carrier to troubleshoot.  The issue described has nothing to do with the phone.

  • I am trying to configure my SCXI-1540 card for excitation voltage and frequency using MAX - but it is not giving me that option when I click on the card and then properties​, am I looking in the wrong place?

    I am trying to configure my SCXI-1540 w/1315 card for excitation voltage and frequency using MAX - but it is not giving me that option when I click on the card and then properties, am I looking in the wrong place?
    I have LabVIEW Express 7.0 Professional - SCXI-1000 Chassiss - along with SCXI-1112, and SCXI 1520/1314 - cable to the PCI-6052E is attached to the 1520 card.
    MAX says it recognizes all the cards in the chassiss.

    Jeremy, Thanks for the reply.
    I tried to set up the system as DAQmx.
    I had MAX auto-detect the set-up - and it recognized all the cards - but did not select the 1315 accessory on the 1540 card - I had to do that manually - but in the configuration section I would select the accessory and it would deselect itself. I had to get out of the set-up and then right click on the 1540 card and click on the "Accessories" tab and select the 1315 terminal block that way.
    It didn't seem right that the system should behave that way, but I pressed onward.
    I then tried to create a new DAQmx Task
    When I create new DAQmx task and then click on Analog Input no "Position" Tab appears for me to select, all I get are:
    Analog>>Voltage
    Analog>>Temperature
    Ana
    log>>Strain
    Analog>>Current
    Analog>>Resistance
    Analog>>Frequency
    Analog>>Custom Voltage with Excitation
    Do you think there might be something wrong with either my hardware or perhaps my configuration that is not allowing it to recognize the 1540/1315 in DAQmx?
    I had included the system report of what programs I am using, etc. as attached file nireport.txt
    After the DAQmx did not work I tried installing everything as Traditional DAQ and it did let me set-up the 1540 Card with Excitation Voltage and Frequency and gain - I then went in to the VI that I had built and tried to use the Express DAQ Assisant to read the channel that I am connected to on the 1315/1540 - when I try to use DAQ Assistant it gives me an error saying that "Device not available in NI-DAQmx. It is possible that the device is being use by traditional NI-DAQ"
    Which I guess it is since both configurations are now set-up in MAX.
    I would PREFER to use the DAQmx set-up, but I am confused as to WHY it won
    't come up with
    Analog input>>POSITION>>LVDT
    When I try to create a new DAQmx task.
    Thanks for the help so far! As you can probably tell I am new at this.
    Ryan
    Attachments:
    nireport.txt ‏2 KB

  • When i put my sim in the phone i.e iphone 4s it said that your phone will be activated in  minutes and then it gave a message related to sim so what does it mean is my phone locked i got it from uk

    when i put my sim in the phone i.e iphone 4s it said that your phone will be activated in  minutes and then it gave a message related to sim so what does it mean is my phone locked i got it from uk

    Probably , but what is the message

  • How to create a vi that counts for example 3 - 10 pulses in and then give a 1 puls out

    how to create a vi that counts for example 3 - 10 pulses in and then give a 1 puls out.
    I'm working with Labview 6.1
    Running with Labview 6.1
    Fieldpoint hardware

    Hi,
    You should be more specific, what kind of hardware you are using ???
    Which kind of pulse you are measuring ?? You are saying that you want to count a number of pulses and then when you get to a limit (which will be between 3 and 10) you want to output a pulse ?
    Andre Oliveira

  • If someone trying to call me on there first attempt they can hear that it's busy even if its not and then on 2nd trial it's fine. How can I fix it.?

    If someone trying to call me on there first attempt they can hear that it's busy even if its not and then on 2nd trial it's fine. How can I fix it.?

    Hey there holla0,
    It sounds like the person calling you has to call 2 times to get through. The first time they get a busy signal and the second time it goes through. I want to recommend the following troubleshooting assistant for cellular connections to help troubleshoot the issue:
    Calls and connection issues
    http://www.apple.com/support/iphone/assistant/calls/
    Start at step 2, and work your way down as needed. Here is step 2 to get you started:
    Reset network settings
    To reset your network settings, tap Settings > General > Reset, then scroll down and tap Reset Network Settings.
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • I'm trying to download the new MacOS. I keep getting a dialog that says: "We could not complete your purchase" and then " The product distribution file could not be verified. It may be damaged or was not signed." any ideas?

    I'm trying to download the new MacOS. I keep getting a dialog that says: "We could not complete your purchase" and then " The product distribution file could not be verified. It may be damaged or was not signed." any ideas?

    I went to Purchases and it worked from there having had the same problem you describe.

  • TS3899 I upgraded to IOS 6, I am unable to get into my Yahoo mail.  It accepts pw, and pops up and tells me how many e-mails I have and then goes right back to the sign on screen. verified that I can get in from laptop & wireless is functioning.any sugges

    I upgraded to IOS 6, I am unable to get into my Yahoo mail.  It accepts pw, and pops up and tells me how many e-mails I have and then goes right back to the sign on screen. verified that I can get in from laptop & wireless is functioning.any suggestions?

    Purplehiddledog wrote:
    I do backup with iCloud.  I can't wait until the new iMac is available so that I can once again have my files in more than 1 location without needing to rely solely on the cloud. 
    I also rely on iTunes and my MacBook and Time Machine as well as backing up to iCloud. I know many users know have gone totally PC free, but I chose to use iCloud merely as my third backup.
    I assume that the restore would result in my ability to open Pages and Numbers and fix the problem with deleting apps, but this would also mean that if my Numbers documents still exist solely within the app and are just not on iCloud for some reason that they would be gone forever.  Is that right?
    In a word, yes. In a little more detail.... When you restore from an iCloud backup, you must erase the device and start all over again. There is no other way to access the backup in iCloud without erasing the device. Consequently, you are starting all over again. Therefore, it would also be my assumption that Pages and Numbers will work again and that the deleting apps issues would be fixed as well.
    If the documents are not in the backup, and you do not have a backup elsewhere, the documents could be gone forever.

Maybe you are looking for

  • Implicit call to java method

    Hi, I have a class composed by some methods, I want to find a way on for implicitly call a method in start and end of every method of my class without coding it. example this is my class : public class MyClass { public void a(){ public void b(){ call

  • 10.5.4 won't install-hangs on Configuring Installation

    10.5.4 won't install-hangs on Configuring Installation and I have to force quit the installer. I've tried to wait it out for over an hour, but the progress bar never moves. This is with the Combo Updater. I've also tried using Software Update, but th

  • The cause of duplicate songs with external hard drive??

    I would love to eliminate this annoying problem... I keep my itunes music library on an external hard drive, so when my old g4 died and I got a Macbook I added the old song library to my new library. Almost all of the songs added in duplicates, tripl

  • Is there any way to open an VB6 execulatble application via a Sharepoint application page?

    Is there any way to open an VB6 execulatble application via a Sharepoint application page?

  • No of lines

    Hello, I need to know the number of lines inside the procedure or package in the schema, assume i have 10 procedures and 20 packages, for each procedure and package i wanted to get the number of lines in it. Pls note that this is just an estimation r