top of page
- Script Code -
dofile(reaper.AZ_GetLuaInitPath())
t = {"A","C","D","B"}
table.sort(t)
for i = 1,4 do
Msg(t[i])
end
t = {"p10000","em2500","p11500","p11800"}
table.sort(t)
for i = 1,4 do
Msg(t[i])
end
- Warm Up -
No preparation required
- Script Detail -
dofile(reaper.AZ_GetLuaInitPath())
Loading the initial settings for the Lua version of RIGDOCKS
t = {"A","C","D","B"}
Define an array.
table.sort(t)
Rearrange the array.
for i = 1,4 do
Msg(t[i])
end
Output the values of array indexes (1 to 4) to the console.
t = {"p10000","em2500","p11500","p11800"}
table.sort(t)
Define and sort an array.
for i = 1,4 do
Msg(t[i])
end
Output the values of array indexes (1 to 4) to the console.
- API LINK -
Beginner
AZ_tableSort
Sort an array in ascending order
bottom of page