Computer Science Canada

Listing Alphabetically?

Author:  HowIDo [ Mon Dec 15, 2014 3:48 pm ]
Post subject:  Listing Alphabetically?

What is it you are trying to achieve?
The knowledge to list something alphabetically in Turing


What is the problem you are having?
Not knowing how to do it.


Describe what you have tried to solve this problem
Look around.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
-

Turing:


<Add your code here>



Please specify what version of Turing you are using
4.1

Author:  Nathan4102 [ Mon Dec 15, 2014 4:42 pm ]
Post subject:  RE:Listing Alphabetically?

In Turing, you can compare strings alphabetically by using the '>', '<' and '=' operator.

If x > y = true, you know that x is later than y in an alphabetical list. The opposite is true for <.

if (x = y) = true, you know the strings are alphabetically equal, and it makes no odds which order you place them in.

Using these, you should be able to craft some sort of method to alphabetically sort an array of strings (or multiple String variables).


: