APLX Help : Help on APL language : APL Primitives : ⍞ Character input
|
|
|
|
|
The
A←⍞ (The cursor is placed at the beginning of
HELLO the next line and whatever is typed is
accepted. Note there is no prompt. The
characters HELLO are put in A.
A the contents of A are displayed)
HELLO
X←⍞
12 (12 is put in X as a 2-character data item)
X+5
DOMAIN ERROR (The 12 in X is two characters . Characters
X+5 can't be used in arithmetic. See ⍎ if
^ you want to convert characters to numbers.)
An extract from a user-defined function: [3] 'PLEASE TYPE YOUR NAME.'
[4] NAME←⍞ (The response is put in NAME)
[5] 'THANK YOU ',NAME (The contents of NAME are
displayed after 'THANK YOU ')
The dialogue will look like this: PLEASE TYPE YOUR NAME.
REGINALD
THANK YOU REGINALD
|
|
APLX Help : Help on APL language : APL Primitives : ⍞ Character input
|
|
Copyright © 1996-2010 MicroAPL Ltd