Input
1!:1[1 will take one line of input terminated by pressing the enter key.
1!:1[3 will take a number of lines of input (terminated by Ctrl-D on my Mac, Ctrl-C on Windows).
If you're trying to input numbers, using ". will evaluate the string and return a list of numbers ready to be manipulated. If you're taking in one number but need to operate on the digits individually, ".,' ',. (thanks to Jan Dvorak's comment for this) or "."0 will put spaces in betweensplit the string into separate digits before evaluating them:
".,'"0[1!:1[1
12345
1 '2 3 4 5
".,.1!:1[1
12345
1 2 3 4 5
If you're reading in strings, the shortest way to get a boxed list of separate strings is to use ;:. This works best for space separated strings:
;:1!:1[1
hello world
┌─────┬─────┐
│hello│world│
└─────┴─────┘
Input
1!:1[1 will take one line of input terminated by pressing the enter key.
1!:1[3 will take a number of lines of input (terminated by Ctrl-D on my Mac, Ctrl-C on Windows).
If you're trying to input numbers, using ". will evaluate the string and return a list of numbers ready to be manipulated. If you're taking in one number but need to operate on the digits individually, ".,' ',. will put spaces in between the digits before evaluating them:
".,' ',.1!:1[1
12345
1 2 3 4 5
If you're reading in strings, the shortest way to get a boxed list of separate strings is to use ;:. This works best for space separated strings:
;:1!:1[1
hello world
┌─────┬─────┐
│hello│world│
└─────┴─────┘
Input
1!:1[1 will take one line of input terminated by pressing the enter key.
1!:1[3 will take a number of lines of input (terminated by Ctrl-D on my Mac, Ctrl-C on Windows).
If you're trying to input numbers, using ". will evaluate the string and return a list of numbers ready to be manipulated. If you're taking in one number but need to operate on the digits individually, ".,. (thanks to Jan Dvorak's comment for this) or "."0 will split the string into separate digits:
"."0[1!:1[1
12345
1 2 3 4 5
".,.1!:1[1
12345
1 2 3 4 5
If you're reading in strings, the shortest way to get a boxed list of separate strings is to use ;:. This works best for space separated strings:
;:1!:1[1
hello world
┌─────┬─────┐
│hello│world│
└─────┴─────┘
Input
1!:1[1 will take one line of input terminated by pressing the enter key.
1!:1[3 will take a number of lines of input (terminated by Ctrl-D on my Mac, I think it's Ctrl-ZC on Windows).
If you're trying to input numbers, using ". will evaluate the string and return a list of numbers ready to be manipulated. If you're taking in one number but need to operate on the digits individually, ".,' ',. will put spaces in between the digits before evaluating them:
".,' ',.1!:1[1
12345
1 2 3 4 5
If you're reading in strings, the shortest way to get a boxed list of separate strings is to use ;:. This works best for space separated strings:
;:1!:1[1
hello world
┌─────┬─────┐
│hello│world│
└─────┴─────┘
Input
1!:1[1 will take one line of input terminated by pressing the enter key.
1!:1[3 will take a number of lines of input (terminated by Ctrl-D on my Mac, I think it's Ctrl-Z on Windows).
If you're trying to input numbers, using ". will evaluate the string and return a list of numbers ready to be manipulated. If you're taking in one number but need to operate on the digits individually, ".,' ',. will put spaces in between the digits before evaluating them:
".,' ',.1!:1[1
12345
1 2 3 4 5
If you're reading in strings, the shortest way to get a boxed list of separate strings is to use ;:. This works best for space separated strings:
;:1!:1[1
hello world
┌─────┬─────┐
│hello│world│
└─────┴─────┘
Input
1!:1[1 will take one line of input terminated by pressing the enter key.
1!:1[3 will take a number of lines of input (terminated by Ctrl-D on my Mac, Ctrl-C on Windows).
If you're trying to input numbers, using ". will evaluate the string and return a list of numbers ready to be manipulated. If you're taking in one number but need to operate on the digits individually, ".,' ',. will put spaces in between the digits before evaluating them:
".,' ',.1!:1[1
12345
1 2 3 4 5
If you're reading in strings, the shortest way to get a boxed list of separate strings is to use ;:. This works best for space separated strings:
;:1!:1[1
hello world
┌─────┬─────┐
│hello│world│
└─────┴─────┘
Input
1!:1[1 will take one line of input terminated by pressing the enter key.
1!:1[3 will take a number of lines of input (terminated by Ctrl-D on my Mac, I think it's Ctrl-Z on Windows).
If you're trying to input numbers, using ". will evaluate the string and return a list of numbers ready to be manipulated. If you're taking in one number but need to operate on the digits individually, ".,' ',. will put spaces in between the digits before evaluating them:
".,' ',.1!:1[1
12345
1 2 3 4 5
If you're reading in strings, the shortest way to get a boxed list of separate strings is to use ;:. This works best for space separated strings:
;:1!:1[1
hello world
┌─────┬─────┐
│hello│world│
└─────┴─────┘