View Single Post
Old 07-03-2004, 05:50 AM   #3 (permalink)
supafly
Psycho
 
supafly's Avatar
 
Location: Rotterdam
Great, after putting links and rechts in the qsort function. I only had to declare links and rechts and it worked!

Here is the modified code:

// Function prototypes
int links;
int rechts;
void eigen_functie(int invoer[]);
void qsort(int invoer[], int links, int rechts);
void swap(int invoer[], int i, int j);
void main(void)
{
int invoer[size] = {69,51,59,55,38,26,21,63,34,84};


WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P2DIR |= BIT3; // Set P2.3 as output

P2OUT |= BIT3; // Set BIT3 (LEDS Off)

TACTL = TASSEL0 + TACLR; // Timer A clock is ACLK + clear
TACTL |= MC1; // Timer A in Continous mode


//eigen_functie(invoer);
qsort(invoer,links,rechts);


TACTL = MC_0;
P2OUT &= ~BIT3; // Clear BIT3 (LEDS On)

}

Reuze bedankt! = Thank you verry much
__________________
Thumbs up
supafly is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37