mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.12.0.3
This commit is contained in:
@@ -42,8 +42,8 @@ ABORT opcodes
|
||||
the calculation is never completed and to stop it, an interruption
|
||||
(on many systems, by ctrl-C) will be necessary.
|
||||
|
||||
> config("trace", 8),
|
||||
> define f(x) {local s; while (x) {s += x--} return s}
|
||||
; config("trace", 8),
|
||||
; define f(x) {local s; while (x) {s += x--} return s}
|
||||
0: DEBUG line 2
|
||||
2: PARAMADDR x
|
||||
4: JUMPZ 19
|
||||
@@ -68,7 +68,7 @@ ABORT opcodes
|
||||
{s += x--} loop. In interactive mode, with ^C indicating
|
||||
input of ctrl-C, the displayed output is as in:
|
||||
|
||||
> f(-1)
|
||||
; f(-1)
|
||||
^C
|
||||
[Abort level 1]
|
||||
"f": line 2: Calculation aborted at statement boundary
|
||||
@@ -77,7 +77,7 @@ ABORT opcodes
|
||||
Changing config("trace") to achieve this, and defining g(x) with
|
||||
the same definition as for f(x) gives:
|
||||
|
||||
> define g(x) {local s; while (x) {s += x--} return s}
|
||||
; define g(x) {local s; while (x) {s += x--} return s}
|
||||
0: PARAMADDR x
|
||||
2: JUMPZ 15
|
||||
4: LOCALADDR s
|
||||
@@ -94,13 +94,15 @@ ABORT opcodes
|
||||
|
||||
If g(-1) is called, two interrupts are necessary, as in:
|
||||
|
||||
> g(-1)
|
||||
; g(-1)
|
||||
^C
|
||||
[Abort level 1]
|
||||
^C
|
||||
[Abort level 2]
|
||||
"g": Calculation aborted in opcode
|
||||
|
||||
## Copyright (C) 1999-2006 David I. Bell, Landon Curt Noll and Ernest Bowen
|
||||
##
|
||||
## Calc is open software; you can redistribute it and/or modify it under
|
||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||
## as published by the Free Software Foundation.
|
||||
@@ -115,8 +117,8 @@ ABORT opcodes
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## @(#) $Revision: 29.4 $
|
||||
## @(#) $Id: interrupt,v 29.4 2000/07/17 15:38:52 chongo Exp $
|
||||
## @(#) $Revision: 29.5 $
|
||||
## @(#) $Id: interrupt,v 29.5 2006/06/10 12:28:10 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/interrupt,v $
|
||||
##
|
||||
## Under source code control: 1991/07/21 04:37:21
|
||||
|
Reference in New Issue
Block a user