1# xlop package 2# Matthew Bertucci 10/5/2021 for v0.28 3 4\opset{options%keyvals} 5\opadd{num1}{num2} 6\opadd[options%keyvals]{num1}{num2} 7\opmanyadd{%<num1%>}{%<num2%>}%<...{numN}%> 8\opmanyadd[%<options%>]{%<num1%>}{%<num2%>}%<...{numN}%> 9\opsub{num1}{num2} 10\opsub[options%keyvals]{num1}{num2} 11\opmul{num1}{num2} 12\opmul[options%keyvals]{num1}{num2} 13\opdiv{num1}{num2} 14\opdiv[options%keyvals]{num1}{num2} 15\opidiv{num1}{num2} 16\opidiv[options%keyvals]{num1}{num2} 17 18#keyvals:\opset#c,\opadd#c,\opmanyadd#c,\opsub#c,\opmul#c,\opdiv#c,\opidiv#c,\opgfsqrt#c 19afterperiodsymbol= 20equalsymbol= 21approxsymbol= 22decimalsepsymbol= 23addsymbol= 24subsymbol= 25mulsymbol= 26divsymbol= 27voperation=#top,center,bottom 28voperator=#top,center,bottom 29deletezero#true,false 30style=#display,text 31parenthesisnegative=#none,all,last 32lineheight=##L 33columnwidth=##L 34decimalsepwidth=##L 35hrulewidth=##L 36vrulewidth=##L 37decimalsepoffset=##L 38operandstyle=%<style cmds%> 39operandstyle.%<num%>=%<style cmds%> 40resultstyle=%<style cmds%> 41resultstyle.%<num%>=%<style cmds%> 42remainderstyle=%<style cmds%> 43remainderstyle.%<num%>=%<style cmds%> 44intermediarystyle=%<style cmds%> 45intermediarystyle.%<num%>=%<style cmds%> 46carrystyle=%<style cmds%> 47carrystyle.%<num%>=%<style cmds%> 48#endkeyvals 49 50\opcolumnwidth#* 51\oplineheight#* 52 53#keyvals:\opadd#c 54carryadd#true,false 55lastcarry#true,false 56#endkeyvals 57 58#keyvals:\opmanyadd#c 59vmanyoperator=#top,center,bottom,Top,Center,Bottom 60#endkeyvals 61 62#keyvals:\opsub#c 63carrysub#true,false 64lastcarry#true,false 65offsetcarry= 66behaviorsub=#silent,warning,error 67#endkeyvals 68 69#keyvals:\opmul#c 70displayshiftintermediary=#shift,all,none 71shiftintermediarysymbol= 72displayintermediary=#none,all,nonzero,None 73hfactor=#right,decimal 74#endkeyvals 75 76#keyvals:\opdiv#c,\opidiv#c 77maxdivstep=%<integer%> 78safedivstep=%<integer%> 79period#true,false 80vruleperiod= 81displayintermediary=#none,all,nonzero,None 82dividendbridge#true,false 83shiftdecimalsep=#both,divisor,none 84strikedecimalsepsymbol= 85#endkeyvals 86 87\opadd*{num1}{num2}{variable} 88\opsub*{num1}{num2}{variable} 89\opmul*{num1}{num2}{variable} 90\opdiv*{num1}{num2}{quotient var}{remainder var} 91\opdiv*[options%keyvals]{num1}{num2}{quotient var}{remainder var} 92\opidiv*{num1}{num2}{quotient var}{remainder var} 93 94#keyvals:\opdiv*#c,\opexpr#c 95maxdivstep=%<integer%> 96safedivstep=%<integer%> 97period#true,false 98#endkeyvals 99 100\opcopy{number}{variable} 101\opprint{arg} 102\opdisplay{style%keyvals}{number} 103\opdisplay[specs]{style}{number} 104\oplput(x,y){text} 105\oprput(x,y){text} 106\ophline(x,y){length} 107\opvline(x,y){length} 108\opexport{number}{cmd}#d 109\opwidth{number}{variable} 110\opintegerwidth{number}{variable} 111\opdecimalwidth{number}{variable} 112\opunzero{number} 113\opinteger{number}{variable} 114\opdecimal{number}{variable} 115\opgetdigit{number}{index}{variable} 116\opsetdigit{number}{index}{variable} 117\opgetintegerdigit{number}{index}{variable} 118\opsetintegerdigit{number}{index}{variable} 119\opgetdecimaldigit{number}{index}{variable} 120\opsetdecimaldigit{number}{index}{variable} 121\opcmp{num1}{num2} 122\ifopgt 123\ifopge 124\ifople 125\ifoplt 126\ifopeq 127\ifopneq 128 129\opgcd{num1}{num2}{variable} 130\opdivperiod{num1}{num2}{variable} 131\opcastingoutnines{number}{variable} 132\opcastingoutelevens{number}{variable} 133\oppower{number}{power}{variable} 134\opfloor{number}{approx rank}{variable} 135\opceil{number}{approx rank}{variable} 136\opround{number}{approx rank}{variable} 137 138\opsqrt{number}{variable} 139\opsqrt[options%keyvals]{number}{variable} 140\opgfsqrt{number} 141\opgfsqrt[options%keyvals]{number} 142 143#keyvals:\opsqrt#c,\opgfsqrt#c 144maxdivstep=%<integer%> 145#endkeyvals 146 147\opexpr{expression}{variable} 148\opexpr[options%keyvals]{expression}{variable} 149\opabs{number}{variable} 150\opneg{number}{variable}