0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

APLメモ

Last updated at Posted at 2021-12-20

基礎編

hello, world

   'hello, world'
hello, world

数値

   ! 30
2.652528598E32
   | ¯5 5 3j4
5 5 5
   24 60 60 ⊤ 10000
2 46 40
   24 60 60 ⊥ 2 46 40
10000

文字

   ⎕a ⍳ 'ABC'
1 2 3
   1 ⊃ 'ABC'
A
   2 ⌷ 'ABC'
B
   'ABC'[3]
C

テーブル

   +/ 1 2 3 4
10
   1 2 3 ∘.× 1 2 3 4
1 2 3  4
2 4 6  8
3 6 9 12
   (((⍳ 5) - 3) × 0j1) ∘.+ ((⍳ 7) - 4)
¯3J¯2 ¯2J¯2 ¯1J¯2 0J¯2 1J¯2 2J¯2 3J¯2
¯3J¯1 ¯2J¯1 ¯1J¯1 0J¯1 1J¯1 2J¯1 3J¯1
¯3    ¯2    ¯1    0    1    2    3   
¯3J01 ¯2J01 ¯1J01 0J01 1J01 2J01 3J01
¯3J02 ¯2J02 ¯1J02 0J02 1J02 2J02 3J02

4次元

   2 2 2 3 ⍴ ⍳ 100
 1  2  3
 4  5  6
        
 7  8  9
10 11 12
        
        
13 14 15
16 17 18
        
19 20 21
22 23 24

応用編

定義

ex.apl
⍝ comment
∇ res ← hello
	:For i :In ⍳ 3
		⎕ ← i
	:EndFor
	res ← 0
∇
hello
1
2
3

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?