Results 1 to 4 of 4

Thread: Ordering co-ords

  1. #1
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [Solved] Ordering co-ords

    Hey all,

    Lets say i record 4 different locations..

    Loc1
    X = 55

    Loc2
    X = 10

    Loc3
    X = 56

    Loc4
    X = 92

    I need to return which Location has the lowest X value. I can do it with checking each against the other, but im sure i can do it in some sort of loop / better than what i am trying to do.

    Thanks

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  2. #2
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nvm sorted it.

    SCAR Code:
    program New;
    {.include SRL\SRL.scar}

    var
    i,y:Integer;
    R: Array of integer;

    begin
      R:=[5,10,20,15];
      BubbleSort(R);
      y:=Length(R);
      for i :=0 to y-1 do
        writeln(IntToStr(r[i]));
    end.


    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  3. #3
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Just to annoy you: Double-post :P

    Well, you found out, so my message is pretty much worthless. Nevertheless, I will never miss a chance to annoy someone for fun

    -Knives

  4. #4
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Haha :P. Thought i would update it just incase someone needs something similar in the future. :P

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Co-ords to degrees ?
    By Jethr0x in forum OSR Help
    Replies: 13
    Last Post: 06-28-2008, 07:32 PM
  2. How to find exact pixel at co-ords
    By Sp0rky in forum OSR Help
    Replies: 4
    Last Post: 03-06-2007, 04:06 PM
  3. Ordering Procedures?
    By wtfpwnage in forum OSR Help
    Replies: 5
    Last Post: 02-22-2007, 04:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •