Equal: Difference between revisions

From NARS2000
Jump to navigationJump to search
No edit summary
(flesh out & use template)
Line 1: Line 1:
__NOTOC__
__NOTOC__
<h1> {equal} &mdash; Test Values For Equality &mdash; Keystroke = or ALT+5 &mdash; Character 0000</h1>
{{Article header 2|sym={equal}|def=Test Values For Equality|ks== or ALT+5
|char=0000
|kb=[[File:APLKB-Equal1.png]]
|kb2=[[File:APLKB-Equal2.png]]}}


[[File:APLKB-Equal1.png]]
[[File:APLKB-Equal2.png]]
==Usage==
==Usage==
Equal is strictly a [[dyadic]] function, there must be a value on both sides of the operator or a VALENCE ERROR will occur. Equal tests the value(s) on the left against the value(s) on the right, and returns 1 for each value that matches, 0 otherwise.
Equal is strictly a [[dyadic]] [[operators|operator]], there must be a value on both sides of the = operator or a VALENCE ERROR will occur. Equal tests the value(s) on the left against the value(s) on the right, and returns 1 for each value that matches, 0 otherwise. Note that unlike the = symbol in a language like C, equal ''never'' assigns a value to a [[variable]], it is only used for comparison purposes. For assignment, the assign symbol is used
==Example==
==Example==
 
:'A'='A'
1
:'a'='A'
0
:2+2=5
0
:1 2 3 4 = 1 0 4 4
1 0 0 1




Line 15: Line 23:
[[Category:Boolean Functions]]
[[Category:Boolean Functions]]
[[Category:Dyadic Functions]]
[[Category:Dyadic Functions]]
[[Category:Operators]]

Revision as of 04:51, 26 November 2014


Usage

Equal is strictly a dyadic operator, there must be a value on both sides of the = operator or a VALENCE ERROR will occur. Equal tests the value(s) on the left against the value(s) on the right, and returns 1 for each value that matches, 0 otherwise. Note that unlike the = symbol in a language like C, equal never assigns a value to a variable, it is only used for comparison purposes. For assignment, the assign symbol is used

Example

'A'='A'

1

'a'='A'

0

2+2=5

0

1 2 3 4 = 1 0 4 4

1 0 0 1



See Also
System Commands System Variables and Functions Operators


Keyboard
Alt+Shift
Alt ¨ ¯ < > × ÷
Shift ~ ! @ # $ % ^ & * ( ) _ +
Key ` 1 2 3 4 5 6 7 8 9 0 - =
Alt+Shift
Alt ? § π
Shift Q W E R T Y U I O P { } |
Key q w e r t y u i o p [ ] \
Alt+Shift
Alt
Shift A S D F G H J K L : "
Key a s d f g h j k l ; '
Alt+Shift χ
Alt
Shift Z X C V B N M < > ?
Key z x c v b n m , . /
NARS 2000 Lang
Tool
Bar
+ - × ÷ * ! ? |
< = >
~ § π .. ,
/ \ ¨ .
_ ¯
Second Row i j k i j k l g p r v x

[[Category:Mouse Group {{{1}}}|{{{2}}}]]