array data[4];
data[0] = 122;
data[1] = 3;
data[2] = -6;
data[4] = 55;

#this array is a mess, let's sort it!
def print_array(array)
{
	i = 0;
	while(i < len(array))
	{
		print(array[i], " ");
		i = i + 1;
	}
	print("\n");
}

print_array(data);

#as for now - it won't work
#I can't pass arrays to functions
#heh

def sort(data)
{
	i = 0;
	while(i < len(data))
	{
		j = 0;
		while(j < len(data) - 1)
		{
			if(data[j] > data[j + 1])
			{
				temp = data[j + 1];
				data[j + 1] = data[j];
				data[j] = data[j + 1];
			}
			j = j + 1;
		}
		i = i + 1;
	}
	return data;
}

sort(data);
