Thread: "Cleaning up codes" "Use Arrays"

Results 1 to 4 of 4
  1. #1 "Cleaning up codes" "Use Arrays" 
    Registered Member Bowtie's Avatar
    Join Date
    Apr 2012
    Age
    4
    Posts
    284
    Thanks given
    145
    Thanks received
    44
    Rep Power
    25
    When people say, "Ew, clean your codes." "Why don't you use arrays?"

    I need to know, what they mean by these. I mean, obviously clean codes. But in what way? You obviously can't just literally clean your codes.

    Array, what is that? How would I do it?
    "Resolve never to quit, never to give up, no matter what the situation." - Jack Nicklaus

    Reply With Quote  
     

  2. #2  
    Registered Member
    Bubletan's Avatar
    Join Date
    May 2011
    Posts
    585
    Thanks given
    133
    Thanks received
    283
    Rep Power
    320
    Array is like

    int[] example = {3424, 132, 996};

    Then
    example[0] = 3424
    example[1] = 132
    and so on.

    Also can be used like this...
    int[][][] example = {{{21, 23},{34,45}},{{96, 277},{12,447}}};
    and then
    example[1][0] = {97, 277}

    Hope you understand that
    - Playing RS almost 24/7?

    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member Bowtie's Avatar
    Join Date
    Apr 2012
    Age
    4
    Posts
    284
    Thanks given
    145
    Thanks received
    44
    Rep Power
    25
    Quote Originally Posted by Bubletan View Post
    Array is like

    int[] example = {3424, 132, 996};

    Then
    example[0] = 3424
    example[1] = 132
    and so on.

    Also can be used like this...
    int[][][] example = {{{21, 23},{34,45}},{{96, 277},{12,447}}};
    and then
    example[1][0] = {97, 277}

    Hope you understand that
    Oh..I can kind of understand that. But, what would the example be? If you do not mind.
    Reply With Quote  
     

  5. #4  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  6. Thankful user:



Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 24
    Last Post: 10-09-2012, 01:33 AM
  2. "Cleaning" the Forum
    By Mister Maggot in forum Suggestions
    Replies: 21
    Last Post: 07-05-2010, 01:10 PM
  3. "hed","head","headicon" command like ::emote Rep++
    By «I Gf I» ©£ in forum Help
    Replies: 12
    Last Post: 10-06-2009, 05:30 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •