world/proc/rearrange(input as list)
Bad input type.
What I'm trying to achieve is basically the php equivalent of..
$bob = rearrange($bob);
function rearrange($input)
{
// Rearranging stuff here
return $input
}
ID:159275
Apr 10 2009, 2:15 pm
|
|
How can I get list as a type of input to a proc?
world/proc/rearrange(input as list) Bad input type. What I'm trying to achieve is basically the php equivalent of.. $bob = rearrange($bob); function rearrange($input) { // Rearranging stuff here return $input } |
Apr 10 2009, 2:48 pm
|
|
I don't know exactly what you mean by your post but I think you mean something along these lines...
|
In response to Spunky_Girl
|
|
Not quite. I'm not after seeking input from the user. I have all the input I just want to re-arrange the list.
|
In response to Bunnie
|
|
Then you'll want to look up the Cut() Swap() and Copy() list pocs
|
I think that, what you're looking for is proc_name(var/list/list_name), or proc_name(list_name[]).
Just as a senseless stupid example: mob |
The as clause designates a type of input when used as a verb argument. When passing proc arguments, you typecast:
proc/sort(list/l) As for sorting the list, what you're after is called bubble sorting. |