1
Modification Help / Re: Problem with arrays
« on: May 20, 2014, 02:53:22 PM »
$endChar = "_._.";
function arrayToString(%array) {
%i = 0;
while($String["::" @ array @ %i] !$= $endChar) {
%output += $String["::" @ array @ %i];
%i++;
}
return %output;
}
$String::test[0] = "abc";
$String::test[1] = "def";
$String::test[2] = "_._.";
echo(arrayToString("test"));
Wouldn't call it the optimal, and I definitely recommend using port's code.
I also haven't tested it.
function arrayToString(%array) {
%i = 0;
while($String["::" @ array @ %i] !$= $endChar) {
%output += $String["::" @ array @ %i];
%i++;
}
return %output;
}
$String::test[0] = "abc";
$String::test[1] = "def";
$String::test[2] = "_._.";
echo(arrayToString("test"));
Wouldn't call it the optimal, and I definitely recommend using port's code.
I also haven't tested it.