πŸ’Ύ Archived View for blitter.com β€Ί apl-books β€Ί apl.maxhost.org β€Ί aplx-notes.html captured on 2024-05-12 at 16:35:24.

View Raw

More Information

⬅️ Previous capture (2022-07-16)

-=-=-=-=-=-=-

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<pre>

use aplx-notes.sh to edit this file
kedit uses monospace fonts with utf-8 encoding

keys for APLX using Unified Keyboard
------------------------------------

shift-k      '
shift-4      $
shift-alt-4  ⍋ grade up, e.g. ⍋B returns indices of B which will arrange B in ascending order
shift-alt-5  ⌽ reverse elements of array along last axis
shift-8	     * exponential
shift-9      (
shift-0      )
shift-'      " double quotes
alt-=        Γ· divide or reciprocal
alt-dash     Γ— multiply
alt-l        βŽ• box
alt-+        ! factorial
alt-i	     ⍳ indexed list character or iota function
alt-g	     βˆ‡ start/end of function
alt-2	     Β― high minus sign
alt-[        ← left arrow means assign e.g. a ←1 means assign 1 to variable a
alt-r	     ⍴ reshape or rho operator
alt-o        β—‹ PI times
alt-h	     β–³ triangle
alt-~	     β—‡ diamond
alt-q	     ? roll, e.g. ?3 returns a random number from 1 to 3
alt-d	     ⌊ floor
alt-s        ⌈ ceiling

)LOAD MARK1	load program MARK1.aws 
)SAVE MARK1	save program MARK1.aws
)IN MARK1	import a Transfile File MARK1.atf
)OUT MARK1	create a Transfile File MARK1.atf
)OFF		exit aplx environment
)CLEAR		clears workspace
)DISPLAY V	display variable V 
)DIGITS		displays how many digits after decimal point is printed
)SYMBOLS	display how many symbols have been used
)TIME		displays date and time
)HOST cmd	execute a host command, e.g. )HOST pwd prints working directory
)HOST           displays which operating system you are working on
)VARS		displays variables
)LIB		list all workspace names
)FNS		list all functions in current workspace
)WIDTH	        displays print width, normally 80 characters

variables and functions are case sensitive e.g. m is different from M

v ← 1 2 3 4 5
          store the numbers 1 through 5 in v

⌽ v       5 4 3 2 1
v[3]	        3
v + 1 	        2 3 4 5 6
v - 1           0 1 2 3 4
v * 2           1 4 9 16 25 gives the array elements to the power of 2
+/v             sum all elements of v
Γ—/v             product of all elements of v     

:Repeat βˆ‡ goob βˆ‡ :EndRepeat
                repeat a function

a ← 1 2 3
b ← 0 1 0
a + b   1 3 3
a x 2   2 4 6

(a b c) ← 1 2 3  compound assignment a = 1, b = 2, c = 3

M -> 'GERBIE POWER'
⌽ M	REWOP EIBREG
3 ⌽ M	BIE POWERGER (rotates letters 3 to the left)

? 100	        generate a random number 1 and 100
? 5 10 20	generate a random number between 1 and 5, 1 and 10, and 1 and 20
!4		factorial 4
3⌊5		returns the lower number 3
Γ·2	        returns reciprocal of 2

14 5 78 145Γ—1.15
	        multiple series of numbers by 1.15 	


2 3 ⍴ 1 2 3 4 5 6  (2 rows, 3 columns)
                1 2 3
                4 5 6

BINGO ← 4 4 ⍴ 16 ? 100
                store 16 numbers from 1 to 100 in a 4x4 matrix in BINGO 

3 5 ⍴ 1
		1 1 1 1 1
		1 1 1 1 1
		1 1 1 1 1

β—‹ 1		displays pi multiplied by 1 (alt-o)
1 β—‹ 1           returns sine at 1 in radians
2 β—‹ 1           returns cosine at 1 in radians 

⍳ 10	        returns numbers 1 to 10
βŽ• a	        returns lower case alphabet
βŽ• A             returns upper case alphabet

v ← ⍳ 10        stores numbers 1 to 10 in v

data ← ?100 p 100
		store 100 random numbers from 1 to 100 in data

x[⍋x←6?40]      pick 6 lottery numbers from 1 to 40
                2 6 9 19 22 31

v ← 6 1 3 4 5
v[⍋v] 		returns array v in ascending order

⌊ 45.9          returns floor of 45
⌈ 45.9		returns ceiling of 46

a ← ⍳4
a ← 2 2 ⍴ a     reshape a into 2x2 matrix

label:		label

βˆ‡ goob          define function goob
'this is it'
βˆ‡

system variables
----------------

βŽ•PP ← 3 	  set print precision to 3 digits
βŽ•RL ← 12345       set random link value 

βŽ•DISPLAY 1 2 3    display data in a box

βŽ•AV               display all characters (atomic vector)


keys
----

ctrl-up arrow recalls previous line

workspaces
----------

located in /usr/local/aplxpe/ws/

HELPDRAW.aws
  ALL_DEMOS

HELPQWI.aws
  DEMO_Button
  DEMO_Menu
  DEMO_Picture
  DEMO_RoundRect

TOOLKIT.aws
  fibspiral
  triangle

</pre>
</head>