Anonymous user
Category:Dc: Difference between revisions
m
→Quick reference: Use literal numbers, not 'a' 'b' 'n', when those were not commands.
(Expand the quick reference to cover OpenBSD dc.) |
m (→Quick reference: Use literal numbers, not 'a' 'b' 'n', when those were not commands.) |
||
Line 19:
Sx : push to register x
Lx : pop register x
<x >x =x : compare top 2 values: if true, then execute register x
!>x !<x !=x : (example: 5 2 <A executes register A if 2 < 5)
! : shell command
q : quit, or break 2 execution levels
i : set input radix from top of stack
I : get current input base, push it on stack
Line 50:
Extensions in [[OpenBSD dc]]
M : mark for the J command
a N : boolean not: push 1 if a == 0, else push 0▼
R : pop and discard top of the stack
<xey >xey : comparisons with an else branch: if true,
=xey !<xey : then execute register x
!>xey !=xey : else execute register y
|