top of page
- API -

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

- API Detail-

No preparation required

- SCRIPT -

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.

- SCRIPT -

Beginner

AZ_tableSort

Sort an array in ascending order

01_BRONZE_ss_edited.png
01_SILVER_edited_edited.png
03_GOLD_edited_edited.png
bottom of page