The working environment of APL is called workplace. In this seminar, users can define programs and data. Data can also exist outside the program in the workplace. Users can change data outside the program, such as:
N & lt- 4 5 6 7
Grant a series of data 4, 5, 6 and 7 to n.
N + 4
Outputs 8, 9, 10, 1 1.
+/N
Output the sum of all numbers in n, which is 22.
Users can store the workspace with all the data and programs in it. Anyway, these programs are not compiled and executed, but interpreted.
APL is most famous for using a set of non-ASCII symbols. These symbols are not just ordinary algebraic and computational symbols. All the problems of air traffic control can be solved by two lines of such grotesque symbols. In fact, in some APL versions, any computable function can be represented by one line. You can express the structure of this function in one line. Because of its precise structure and nonstandard symbols, some people call APL "write-only language". Except mathematicians, it is difficult for others to understand the programs written by APL. Some mathematicians find other languages more difficult to understand than APL. Because APL uses unusual symbols, many programmers use special APL keyboards when writing APL programs. Today, there are different ways to write APL using only ASCII letters.
Iverson later designed the successor of APL, called J language, using only ASCII symbols. So far, there is only one J language. Other languages also provide functions similar to APL. A+ is an open source programming language, and many instructions are the same as APL.
The following example arranges a sequence of words in X according to the length of each word:
X[X+。 & no; ' '; ]