$sort lists

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 8: Line 8:
  
 
To sort the alphabets in the list called %my list in alphabetical order, we will use the sort list function.
 
To sort the alphabets in the list called %my list in alphabetical order, we will use the sort list function.
 +
  
 
<pre>
 
<pre>
Line 16: Line 17:
  
 
[[File:sortlist.png]]
 
[[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".
 
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".
 +
  
 
<pre>
 
<pre>
Line 23: Line 26:
 
type text(<about me textarea>, $sort list(%my list, "Ascending"), "Standard")
 
type text(<about me textarea>, $sort list(%my list, "Ascending"), "Standard")
 
</pre>
 
</pre>
 +
  
 
[[File:sortlist1.png]]
 
[[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".
 
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".

Revision as of 18:42, 21 May 2013

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

List: The populated list being sorted.

Direction: Determines whether the list will be sorted in ascending or descending order.

Example

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