12-28-2016, 06:06 PM
Hello, the frequent use of commands in USER-RPL within my programs. I always needed the following cmds.
Please for USER-RPL programmers can tell me if they are important or not, if they were, they should be incorporated in NEW RPL?
Thank
1: WAIT CMD detecting [ON] KEY without exit the code
2: Operators point .+ .- ./ .* .^, which operate on each element of a vector or matrix, With the purpose of making operations outside the linear algebra
Thanks
Please for USER-RPL programmers can tell me if they are important or not, if they were, they should be incorporated in NEW RPL?
Thank
1: WAIT CMD detecting [ON] KEY without exit the code
PHP Code:
waitForKey
«
"!NO CODE
!RPL
::
CK0
WaitForKey
CodePl>%rc.p
;
" 64 CHR + ASM 'waitForKey' STO
»
2: Operators point .+ .- ./ .* .^, which operate on each element of a vector or matrix, With the purpose of making operations outside the linear algebra
PHP Code:
@.+
[[ 1 2 3 ]]
« AXL 1 « 5 ADD » DOLIST AXL » EVAL -> [[6 7 8]]
NEW-RPL: [[ 1 2 3 ]] 5 .+ -> [[6 7 8]]
@.-
[ 1 2 3 ]
« AXL 1 « 5 - » DOLIST AXL » EVAL -> [-4 -3 -2]
NEW-RPL: [ 1 2 3 ] 5 .- -> [-4 -3 -2]
@.*
[ 1 2 3 ] 5 * -> [ 5 10 15 ]
NEW-RPL: [[ 1 2 3 ]] 5 .* -> [ 5 10 15 ]
[[ 1 2 3 ]] 5 * -> [[ 5 10 15 ]]
NEW-RPL: [[ 1 2 3 ]] 5 .* -> [[ 5 10 15 ]]
@./
[ 1 2 3 ] 5 / @ -> [ 1/5 2/5 3/5 ]
NEW-RPL: [[ 1 2 3 ]] 5 ./ -> [ 1/5 2/5 3/5 ]
@.*
[[ 'a' 'b' ]
[ 'c' 'd' ]]
[[ 'a' 'b' ]
[ 'c' 'd' ]]
« AXL SWAP AXL 2 « * » DOLIST AXL » EVAL
->
[[ 'a*a' 'b*b' ]
[ 'c*c' 'd*d' ]]
NEW-RPL:
[[ 'a' 'b' ]
[ 'c' 'd' ]]
[[ 'a' 'b' ]
[ 'c' 'd' ]] .*
->
[[ 'a*a' 'b*b' ]
[ 'c*c' 'd*d' ]]
@.^
[[ 'a' 'b' ]
[ 'c' 'd' ]]
[[ 'a' 'b' ]
[ 'c' 'd' ]]
« AXL SWAP AXL 2 « ^ » DOLIST AXL » EVAL
[[ 'a^a' 'b^b' ]
[ 'c^c' 'd^d' ]]