View Single Post
  #16  
Old 10-12-2008, 01:32 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I'd suggest learning Python, its a great programming and scripting language. With Python and C++ together you can't loose.

Python is also open-source, allowing you to create C/C++ extensions for Python or embed Python into a C/C++ application which is what I'm doing.

Python Code:
PHP Code:
def SelectionSort(array):
    for 
a in range(len(array)):
        for 
b in range(1len(array)):
            if array[
b] < array[a]:
                
tmp = array[b]
                array[
b] = array[a]
                array[
a] = tmp

#Testing code

data = [16425820100541000523]
SelectionSort(data)
print(
data#Prints: [1, 2, 4, 5, 6, 8, 20, 54, 100, 523, 1000] 
Quote:
Originally Posted by Programmer View Post
I converted it to GScript so that it can be tested by Graal developers.
How dare you place any code outside of a function
And you're making global variables.
__________________

Last edited by Inverness; 10-12-2008 at 01:56 AM..
Reply With Quote