Startseite › Foren › Deutsches LiveCode-Forum › array füllen › Antwort auf: array füllen
März 13, 2020 um 23:11 Uhr
#19586
Hi Klaus, das bringt mich auf die Idee einer Funktion für die automatische Array-Befüllung:
Hier ein Beispiel, das man einfach in ein Button-Script einfügt:
on mouseUp pMouseButton
put createArrayFromList("1,2,3,4") into tArray
answer the keys of tArray
end mouseUp
function createArrayFromList
repeat for each item tItem in the params
add 1 to tCounter
put tItem into tArray[tCounter]
end repeat
return tArray
end createArrayFromList
🙂