View Single Post
  #4  
Old 10-11-2008, 03:25 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
I converted it to GScript so that it can be tested by Graal developers.

PHP Code:
dataSet = {16425820100541000523};

echo(
dataSet);
selectionSort();
echo(
dataSet);

function 
selectionSort()
{
    for (
0dataSet.size() - 1a++)
    {
        for (
1dataSet.size(); b++)
        {
            if (
dataSet[b] < dataSet[a])
            {
                
result dataSet[b];
                
dataSet[b] = dataSet[a];
                
dataSet[a] = result;
            }
        }
    }

Very nice, Gambet.

Quote:
Originally Posted by xXziroXx View Post
I thought we were not allowed to post non-GScript scripts in the Code Library.
I did the same thing about 2 years ago when I posted the Java code for an analog clock. Skyld let it stay for the reason that the formula might help some people, and this is a similar case.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote