$sort lists

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Created page with "This function returns the original list sorted in ascending or descending order. == Example == add list to list(%my list, $list from text("q,w,e,r,t,y,u,i,o,p,a,c,v,b,n", ...")
 
Line 1: Line 1:
This function returns the original list sorted in ascending or descending order.
+
$sort list is a [[Variable Functions|Variable Function]]. This function returns the original list sorted in ascending or descending order.
  
  

Revision as of 14:03, 18 October 2012

$sort list is a Variable Function. This function returns the original list sorted in ascending or descending order.


Example

add list to list(%my list, $list from text("q,w,e,r,t,y,u,i,o,p,a,c,v,b,n", ","), "Delete", "Global")

To sort the alphabets in the list called %my list in alphabetical order, we will use the sort list function.

add list to list(%my list, $list from text("q,w,e,r,t,y,u,i,o,p,a,c,v,b,n", ","), "Delete", "Global")
type text(<about me textarea>, $sort list(%my list, "Descending"), "Standard")


File:Sortlist.png

Setting the sort list function to sort in descending order outputs a list sorted starting with the letter "y" and ending in the letter "a".

add list to list(%my list, $list from text("q,w,e,r,t,y,u,i,o,p,a,c,v,b,n", ","), "Delete", "Global")
type text(<about me textarea>, $sort list(%my list, "Ascending"), "Standard")

File:Sortlist1.png

Setting the sort list function to sort in descending order outputs a list sorted starting with the letter "a" and ending in the letter "y".

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox