Revision: 2649
http://sourceforge.net/p/fricas/code/2649
Author: whebisch
Date: 2020-03-14 18:31:03 +0000 (Sat, 14 Mar 2020)
Log Message:
-----------
Remove Formula format
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/algebra/Makefile.in
trunk/src/interp/i-output.boot
trunk/src/interp/macros.lisp
trunk/src/interp/msgdb.boot
trunk/src/interp/setq.lisp
trunk/src/interp/setvars.boot
trunk/src/interp/setvart.boot
Removed Paths:
-------------
trunk/src/algebra/formula.spad
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2020-03-11 15:55:30 UTC (rev 2648)
+++ trunk/ChangeLog 2020-03-14 18:31:03 UTC (rev 2649)
@@ -1,3 +1,11 @@
+2020-03-14 Waldek Hebisch <
heb...@math.uni.wroc.pl>
+
+ * src/algebra/formula.spad: Remove
+ src/algebra/Makefile.in, src/interp/i-output.boot,
+ src/interp/macros.lisp, src/interp/msgdb.boot,
+ src/interp/setq.lisp, src/interp/setvars.boot,
+ src/interp/setvart.boot: Adjust
+
2020-03-11 Waldek Hebisch <
heb...@math.uni.wroc.pl>
* src/algebra/mathml.spad, src/algebra/tex.spad,
Modified: trunk/src/algebra/Makefile.in
===================================================================
--- trunk/src/algebra/Makefile.in 2020-03-11 15:55:30 UTC (rev 2648)
+++ trunk/src/algebra/Makefile.in 2020-03-14 18:31:03 UTC (rev 2649)
@@ -44,7 +44,7 @@
facutil fdalg ffact ffcat ffcg fffg \
fff ffhom ffnb ffpoly ffp \
ffx files float fmod fname fnla \
- formula fortcat fortmac fortout fortpak fortran forttyp \
+ fortcat fortmac fortout fortpak fortran forttyp \
fourier fparfrac fraction free fr fs2expxp \
fs2ups fspace galfact \
gaussfac gaussian gbeuclid gbintern \
@@ -155,7 +155,7 @@
FLAGG FLALG FLASORT FLINEXP FLIOUFUN FLOATCP FLOATRP \
FLOAT FMAGMA FMCAT FMC FMFUN FMOEBF FMONOID \
FM FM2 FMCF2 FMTC FNAME FNCAT FNGRPH FNLA FOP \
- FORDER FORMCAT FORMULA1 FORMULA FORTCAT FORTFN FORTFORM FORTRAN \
+ FORDER FORMCAT FORTCAT FORTFN FORTFORM FORTRAN \
FPARFRAC FPATMAB FPC FPOSET FPS FR2 \
FRAC2 FRAC FRAMALG FRETRCT FRIDEAL2 FRIDEAL \
FRIMOD FRMOD FRNAAF2 FRNAALG FR FRUTIL FS2EXPXP \
Deleted: trunk/src/algebra/formula.spad
===================================================================
--- trunk/src/algebra/formula.spad 2020-03-11 15:55:30 UTC (rev 2648)
+++ trunk/src/algebra/formula.spad 2020-03-14 18:31:03 UTC (rev 2649)
@@ -1,481 +0,0 @@
-)abbrev domain FORMULA ScriptFormulaFormat
-++ Author: Robert S. Sutor
-++ Date Created: 1987 through 1990
-++ Basic Operations: coerce, convert, display, epilogue,
-++ formula, new, prologue, setEpilogue!, setFormula!, setPrologue!
-++ Related Constructors: ScriptFormulaFormat1
-++ Also See: TexFormat
-++ AMS Classifications:
-++ Keywords: output, format, SCRIPT, BookMaster, formula
-++ References:
-++ SCRIPT Mathematical Formula Formatter User's Guide, SH20-6453,
-++ IBM Corporation, Publishing Systems Information Development,
-++ Dept. G68, P.O. Box 1900, Boulder, Colorado, USA 80301-9191.
-++ Description:
-++ \spadtype{ScriptFormulaFormat} provides a coercion from
-++ \spadtype{OutputForm} to IBM SCRIPT/VS Mathematical Formula Format.
-++ The basic SCRIPT formula format object consists of three parts: a
-++ prologue, a formula part and an epilogue. The functions
-++ \spadfun{prologue}, \spadfun{formula} and \spadfun{epilogue}
-++ extract these parts, respectively. The central parts of the expression
-++ go into the formula part. The other parts can be set
-++ (\spadfun{setPrologue!}, \spadfun{setEpilogue!}) so that contain the
-++ appropriate tags for printing. For example, the prologue and
-++ epilogue might simply contain ":df." and ":edf." so that the
-++ formula section will be printed in display math mode.
-
-ScriptFormulaFormat() : public == private where
- E ==> OutputForm
- I ==> Integer
- L ==> List
- S ==> String
-
- public == SetCategory with
- coerce : E -> %
- ++ coerce(o) changes o in the standard output format to
- ++ SCRIPT formula format.
- convert : (E, I) -> %
- ++ convert(o, step) changes o in standard output format to
- ++ SCRIPT formula format and also adds the given step number.
- ++ This is useful if you want to create equations with given numbers
- ++ or have the equation numbers correspond to the interpreter step
- ++ numbers.
- display : (%, I) -> Void
- ++ display(t, width) outputs the formatted code t so that each
- ++ line has length less than or equal to \spadvar{width}.
- display : % -> Void
- ++ display(t) outputs the formatted code t so that each
- ++ line has length less than or equal to the value set by
- ++ the system command \spadsyscom{set output length}.
- epilogue : % -> L S
- ++ epilogue(t) extracts the epilogue section of a formatted object t.
- formula : % -> L S
- ++ formula(t) extracts the formula section of a formatted object t.
- new : () -> %
- ++ new() create a new, empty object. Use \spadfun{setPrologue!},
- ++ \spadfun{setFormula!} and \spadfun{setEpilogue!} to set the
- ++ various components of this object.
- prologue : % -> L S
- ++ prologue(t) extracts the prologue section of a formatted object t.
- setEpilogue! : (%, L S) -> L S
- ++ setEpilogue!(t, strings) sets the epilogue section of a
- ++ formatted object t to strings.
- setFormula! : (%, L S) -> L S
- ++ setFormula!(t, strings) sets the formula section of a
- ++ formatted object t to strings.
- setPrologue! : (%, L S) -> L S
- ++ setPrologue!(t, strings) sets the prologue section of a
- ++ formatted object t to strings.
-
- private == add
- import from OutputForm
- import from Character
- import from Integer
- import from List OutputForm
- import from List String
- import from OutputFormTools
-
- Rep := Record(prolog : L S, formula : L S, epilog : L S)
-
- -- local variables declarations and definitions
-
- expr : E
- prec, opPrec : I
- str : S
- blank : S := " @@ "
-
- maxPrec : I := 1000000
- minPrec : I := 0
-
- splitChars : S := " <>[](){}+*=,-%"
-
- unaryOps : L S := ["-"]$(L S)
- unaryPrecs : L I := [700]$(L I)
-
- -- the precedence of / in the following is relatively low because
- -- the bar obviates the need for parentheses.
- binaryOps : L S := ["+->","|","^","/","<",">","=","OVER"]$(L S)
- binaryPrecs : L I := [0, 0, 900, 700, 400, 400, 400, 700]$(L I)
-
- naryOps : L S := ["-","+","*",blank,",",";"," ","ROW","",
- " habove "," here "," labove "]$(L S)
- naryPrecs : L I := [700, 700, 800, 800, 110, 110, 0, 0, 0,
- 0, 0, 0]$(L I)
--- naryNGOps : L S := ["ROW"," here "]$(L S)
- naryNGOps : L S := []
-
- plexOps : L S := ["SIGMA","PI","INTSIGN"]$(L S)
- plexPrecs : L I := [ 700, 800, 700]$(L I)
-
- specialOps : L S := ["MATRIX","BRACKET","BRACE","CONCATB", _
- "AGGLST","CONCAT","OVERBAR","ROOT","SUB", _
- "SUPERSUB","ZAG","AGGSET","SC","PAREN",
- "PRIME"]
-
- -- the next two lists provide translations for some strings for
- -- which the formula formatter provides special variables.
-
- specialStrings : L S :=
- ["5","..."]
- specialStringsInFormula : L S :=
- [" alpha "," ellipsis "]
-
- -- local function signatures
-
- addBraces : S -> S
- addBrackets : S -> S
- group : S -> S
- formatBinary : (S, L E, I) -> S
- formatFunction : (S, L E, I) -> S
- formatMatrix : L E -> S
- formatNary : (S, L E, I) -> S
- formatNaryNoGroup : (S, L E, I) -> S
- formatNullary : S -> S
- formatPlex : (S, L E, I) -> S
- formatSpecial : (S, L E, I) -> S
- formatUnary : (S, E, I) -> S
- formatFormula : (E, I) -> S
- parenthesize : S -> S
- postcondition : S -> S
- splitLong : (S, I) -> L S
- splitLong1 : (S, I) -> L S
- stringify : E -> S
-
- -- public function definitions
-
- new() : % == [[".eq set blank @",":df."]$(L S),
- [""]$(L S), [":edf."]$(L S)]$Rep
-
- coerce(expr : E) : % ==
- f : % := new()$%
- f.formula := [postcondition
- formatFormula(precondition expr, minPrec)]$(L S)
- f
-
- convert(expr : E, stepNum : I) : % ==
- f : % := new()$%
- f.formula := concat(["<leqno lparen ",string(stepNum)$S,
- " rparen>"], [postcondition
- formatFormula(precondition expr, minPrec)]$(L S))
- f
-
- display(f : %, len : I) ==
- s, t : S
- for s in f.prolog repeat sayFORMULA(s)$Lisp
- for s in f.formula repeat
- for t in splitLong(s, len) repeat sayFORMULA(t)$Lisp
- for s in f.epilog repeat sayFORMULA(s)$Lisp
- void()$Void
-
- display(f : %) ==
- display(f, _$LINELENGTH$Lisp pretend I)
-
- prologue(f : %) == f.prolog
- formula(f : %) == f.formula
- epilogue(f : %) == f.epilog
-
- setPrologue!(f : %, l : L S) == f.prolog := l
- setFormula!(f : %, l : L S) == f.formula := l
- setEpilogue!(f : %, l : L S) == f.epilog := l
-
- coerce(f : %) : E ==
- s, t : S
- l : L S := []
- for s in f.prolog repeat l := concat(s, l)
- for s in f.formula repeat
- for t in splitLong(s, (_$LINELENGTH$Lisp pretend Integer) - 4) repeat
- l := concat(t, l)
- for s in f.epilog repeat l := concat(s, l)
- (reverse l) :: E
-
- -- local function definitions
-
- postcondition(str : S) : S ==
- len : I := #str
- len < 4 => str
- plus : Character := char "+"
- minus : Character := char "-"
- for i in 1..(len-1) repeat
- if (str.i =$Character plus) and (str.(i+1) =$Character minus)
- then setelt!(str, i, char " ")$S
- str
-
- stringify expr == object2String(expr)$Lisp pretend S
-
- splitLong(str : S, len : I) : L S ==
- -- this blocks into lines
- if len < 20 then len := _$LINELENGTH$Lisp
- splitLong1(str, len)
-
- splitLong1(str : S, len : I) ==
- l : List S := []
- s : S := ""
- ls : I := 0
- ss : S
- lss : I
- for ss in split(str,char " ") repeat
- lss := #ss
- if ls + lss > len then
- l := concat(s, l)$List(S)
- s := ""
- ls := 0
- lss > len => l := concat(ss, l)$List(S)
- ls := ls + lss + 1
- s := concat(s,concat(ss," ")$S)$S
- if ls > 0 then l := concat(s, l)$List(S)
- reverse l
-
- group str ==
- concat ["<",str,">"]
-
- addBraces str ==
- concat ["left lbrace ",str," right rbrace"]
-
- addBrackets str ==
- concat ["left lb ",str," right rb"]
-
- parenthesize str ==
- concat ["left lparen ",str," right rparen"]
-
- formatSpecial(op : S, args : L E, prec : I) : S ==
- op = "AGGLST" =>
- formatNary(",",args,prec)
- op = "AGGSET" =>
- formatNary(";",args,prec)
- op = "CONCATB" =>
- formatNary(" ",args,prec)
- op = "CONCAT" =>
- formatNary("",args,prec)
- op = "BRACKET" =>
- group addBrackets formatFormula(first args, minPrec)
- op = "BRACE" =>
- group addBraces formatFormula(first args, minPrec)
- op = "PAREN" =>
- group parenthesize formatFormula(first args, minPrec)
- op = "PRIME" =>
- formatSpecial("SUPERSUB", [first args, empty()$E,
- second(args)], prec)
- op = "OVERBAR" =>
- empty?(args) => ""
- group concat [formatFormula(first args, minPrec)," bar"]
- op = "ROOT" =>
- empty?(args) => ""
- tmp : S := formatFormula(first args, minPrec)
- empty?(rest args) => group concat ["sqrt ",tmp]
- group concat ["midsup adjust(u 1.5 r 9) ",
- formatFormula(first rest args, minPrec)," sqrt ",tmp]
- op = "SC" =>
- formatNary(" labove ",args,prec)
- op = "SUB" =>
- group concat [formatFormula(first args, minPrec)," sub ",
- formatSpecial("AGGLST",rest args,minPrec)]
- op = "SUPERSUB" =>
- -- variable name
- form : List S := [formatFormula(first args, minPrec)]
- -- subscripts
- args := rest args
- empty?(args) => concat form
- tmp : S := formatFormula(first args, minPrec)
- if tmp ~= "" then form := append(form,[" sub ",tmp])$(List S)
- -- superscripts
- args := rest args
- empty?(args) => group concat form
- tmp : S := formatFormula(first args, minPrec)
- if tmp ~= "" then form := append(form,[" sup ",tmp])$(List S)
- -- presuperscripts
- args := rest args
- empty?(args) => group concat form
- tmp : S := formatFormula(first args, minPrec)
- if tmp ~= "" then form := append(form,[" presup ",tmp])$(List S)
- -- presubscripts
- args := rest args
- empty?(args) => group concat form
- tmp : S := formatFormula(first args, minPrec)
- if tmp ~= "" then form := append(form,[" presub ",tmp])$(List S)
- group concat form
- op = "MATRIX" => formatMatrix rest args
--- op = "ZAG" =>
--- concat ["\zag{",formatFormula(first args, minPrec),"}{",
--- formatFormula(first rest args,minPrec),"}"]
- concat ["not done yet for ",op]
-
- formatPlex(op : S, args : L E, prec : I) : S ==
- hold : S
- p : I := position(op, plexOps)
- p < 1 => error "unknown Script Formula Formatter unary op"
- opPrec := plexPrecs.p
- n : I := #args
- (n ~= 2) and (n ~= 3) => error "wrong number of arguments for plex"
- s : S :=
- op = "SIGMA" => "sum"
- op = "PI" => "product"
- op = "INTSIGN" => "integral"
- "????"
- hold := formatFormula(first args, minPrec)
- args := rest args
- if hold ~= "" then
- s := concat [s," from",group concat ["\displaystyle ",hold]]
- if not(empty?(rest args)) then
- hold := formatFormula(first args, minPrec)
- if hold ~= "" then
- s := concat [s," to",group concat ["\displaystyle ",hold]]
- args := rest args
- s := concat [s," ",formatFormula(first args,minPrec)]
- if opPrec < prec then s := parenthesize s
- group s
-
- formatMatrix(args : L E) : S ==
- -- format for args is [[ROW ...], [ROW ...], [ROW ...]]
- group addBrackets formatNary(" habove ",args,minPrec)
-
- formatFunction(op : S, args : L E, prec : I) : S ==
- group concat [op, " ", parenthesize formatNary(",",args,minPrec)]
-
- formatNullary(op : S) ==
- op = "NOTHING" => ""
- group concat [op,"()"]
-
- formatUnary(op : S, arg : E, prec : I) ==
- p : I := position(op, unaryOps)
- p < 1 => error "unknown Script Formula Formatter unary op"
- opPrec := unaryPrecs.p
- s : S := concat [op, formatFormula(arg, opPrec)]
- opPrec < prec => group parenthesize s
- op = "-" => s
- group s
-
- formatBinary(op : S, args : L E, prec : I) : S ==
- p : I := position(op, binaryOps)
- p < 1 => error "unknown Script Formula Formatter binary op"
- op :=
- op = "^" => " sup "
- op = "/" => " over "
- op = "OVER" => " over "
- op
- opPrec := binaryPrecs.p
- s : S := formatFormula(first args, opPrec)
- s := concat [s, op, formatFormula(first rest args, opPrec)]
- group
- op = " over " => s
- opPrec < prec => parenthesize s
- s
-
- formatNary(op : S, args : L E, prec : I) : S ==
- group formatNaryNoGroup(op, args, prec)
-
- formatNaryNoGroup(op : S, args : L E, prec : I) : S ==
- empty?(args) => ""
- p : I := position(op, naryOps)
- p < 1 => error "unknown Script Formula Formatter nary op"
- op :=
- op = "," => ", @@ "
- op = ";" => "; @@ "
- op = "*" => blank
- op = " " => blank
- op = "ROW" => " here "
- op
- l : L S := []
- opPrec := naryPrecs.p
- for a in args repeat
- l := concat(op, concat(formatFormula(a, opPrec), l)$L(S))$L(S)
- s : S := concat reverse rest l
- opPrec < prec => parenthesize s
- s
-
- formatFormula(expr, prec) ==
- i : Integer
- atom?(expr) =>
- str := stringify expr
- integer?(expr) =>
- i := integer(expr)
- if (i < 0) or (i > 9) then group str else str
- (i := position(str, specialStrings)) > 0 =>
- specialStringsInFormula.i
- str
- opf := operator(expr)
- op : S := stringify opf
- args : L E := arguments(expr)
- nargs : I := #args
-
- -- special cases
- member?(op, specialOps) => formatSpecial(op, args, prec)
- member?(op, plexOps) => formatPlex(op, args, prec)
-
- -- nullary case
- 0 = nargs => formatNullary op
-
- -- unary case
- (1 = nargs) and member?(op, unaryOps) =>
- formatUnary(op, first args, prec)
-
- -- binary case
- (2 = nargs) and member?(op, binaryOps) =>
- formatBinary(op, args, prec)
-
- -- nary case
- member?(op, naryNGOps) => formatNaryNoGroup(op, args, prec)
- member?(op, naryOps) => formatNary(op, args, prec)
- op := formatFormula(opf, minPrec)
- formatFunction(op, args, prec)
-
-)abbrev package FORMULA1 ScriptFormulaFormat1
-++ Author: Robert S. Sutor
-++ Date Created: 1987 through 1990
-++ Basic Operations: coerce
-++ Related Constructors: ScriptFormulaFormat
-++ Also See: TexFormat, TexFormat1
-++ AMS Classifications:
-++ Keywords: output, format, SCRIPT, BookMaster, formula
-++ References:
-++ SCRIPT Mathematical Formula Formatter User's Guide, SH20-6453,
-++ IBM Corporation, Publishing Systems Information Development,
-++ Dept. G68, P.O. Box 1900, Boulder, Colorado, USA 80301-9191.
-++ Description:
-++ \spadtype{ScriptFormulaFormat1} provides a utility coercion for
-++ changing to SCRIPT formula format anything that has a coercion to
-++ the standard output format.
-
-ScriptFormulaFormat1(S : SetCategory) : public == private where
- public == with
- coerce : S -> ScriptFormulaFormat()
- ++ coerce(s) provides a direct coercion from an expression s of domain S to
- ++ SCRIPT formula format. This allows the user to skip the step of
- ++ first manually coercing the object to standard output format
- ++ before it is coerced to SCRIPT formula format.
-
- private == add
- import from ScriptFormulaFormat()
-
- coerce(s : S) : ScriptFormulaFormat ==
- coerce(s :: OutputForm)$ScriptFormulaFormat
-
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Modified: trunk/src/interp/i-output.boot
===================================================================
--- trunk/src/interp/i-output.boot 2020-03-11 15:55:30 UTC (rev 2648)
+++ trunk/src/interp/i-output.boot 2020-03-14 18:31:03 UTC (rev 2649)
@@ -66,7 +66,6 @@
DEFCONST($DoubleQuote, '"_"")
DEFVAR($algebraFormat, true) -- produce 2-d algebra output
-DEFVAR($formulaFormat, false) -- if true produce script formula output
DEFVAR($fortranFormat, false) -- if true produce fortran output
DEFVAR($htmlFormat, false) -- if true produce HTML output
DEFVAR($mathmlFormat, false) -- if true produce Math ML output
@@ -1094,16 +1093,6 @@
output(x,m)
if not $collectOutput then TERPRI $algebraOutputStream
-formulaFormat expr ==
- sff := '(ScriptFormulaFormat)
- formatFn := getFunctionFromDomain("coerce",sff,[$OutputForm])
- displayFn := getFunctionFromDomain("display",sff,[sff])
- SPADCALL(SPADCALL(expr,formatFn),displayFn)
- if not $collectOutput then
- TERPRI $algebraOutputStream
- FORCE_-OUTPUT $formulaOutputStream
- NIL
-
fortranFormat expr ==
ff := '(FortranFormat)
formatFn :=
@@ -1178,7 +1167,6 @@
texFormat outputDomainConstructor expr
T := coerceInteractive(objNewWrap(expr,domain),$OutputForm) =>
x := objValUnwrap T
- if $formulaFormat then formulaFormat x
if $fortranFormat then fortranFormat x
if $algebraFormat then
mathprintWithNumber x
Modified: trunk/src/interp/macros.lisp
===================================================================
--- trunk/src/interp/macros.lisp 2020-03-11 15:55:30 UTC (rev 2648)
+++ trunk/src/interp/macros.lisp 2020-03-14 18:31:03 UTC (rev 2649)
@@ -460,8 +460,6 @@
(defvar |$fortranOutputStream|)
-(defvar |$formulaOutputStream|)
-
(defvar |$highlightAllowed| nil "Used in BRIGHTPRINT and is a )set variable.")
(defvar |$highlightFontOn| (concat " " |$boldString|)
Modified: trunk/src/interp/msgdb.boot
===================================================================
--- trunk/src/interp/msgdb.boot 2020-03-11 15:55:30 UTC (rev 2648)
+++ trunk/src/interp/msgdb.boot 2020-03-14 18:31:03 UTC (rev 2649)
@@ -952,8 +952,6 @@
sayMSG(x) == sayBrightly1(x, $algebraOutputStream)
-sayFORMULA(x) == sayBrightly1(x, $formulaOutputStream)
-
sayMSG2File(msg) ==
file := makePathname("spadmsg", "listing")
str := MAKE_OUTSTREAM(file)
Modified: trunk/src/interp/setq.lisp
===================================================================
--- trunk/src/interp/setq.lisp 2020-03-11 15:55:30 UTC (rev 2648)
+++ trunk/src/interp/setq.lisp 2020-03-14 18:31:03 UTC (rev 2649)
@@ -44,8 +44,7 @@
(setq |$algebraOutputStream|
(setq |$fortranOutputStream|
(setq |$texOutputStream|
- (setq |$formulaOutputStream|
- (make-synonym-stream '*standard-output*)))))
+ (make-synonym-stream '*standard-output*))))
(defvar |$frameMessages| nil)
(defvar |$displayStartMsgs| nil)
Modified: trunk/src/interp/setvars.boot
===================================================================
--- trunk/src/interp/setvars.boot 2020-03-11 15:55:30 UTC (rev 2648)
+++ trunk/src/interp/setvars.boot 2020-03-14 18:31:03 UTC (rev 2649)
@@ -1043,78 +1043,6 @@
'"the one you set with the )cd system command.",'%l,_
'"The current setting is: ",'%b,setOutputOpenMath "%display%",'%d)
-setOutputFormula arg ==
- arg = "%initialize%" =>
- $formulaOutputStream := mkOutputConsoleStream()
- $formulaOutputFile := '"CONSOLE"
- $formulaFormat := NIL
-
- arg = "%display%" =>
- if $formulaFormat then label := '"On:" else label := '"Off:"
- STRCONC(label,$formulaOutputFile)
-
- (null arg) or (arg = "%describe%") or (first arg = '_?) =>
- describeSetOutputFormula()
-
- -- try to figure out what the argument is
-
- if arg is [fn] and
- fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console)
- then 'ok
- else arg := [fn,'sform]
-
- arg is [fn] =>
- UPCASE(fn) in '(Y N YE O OF) =>
- sayKeyedMsg("S2IV0002",'(script script))
- UPCASE(fn) in '(NO OFF) => $formulaFormat := NIL
- UPCASE(fn) in '(YES ON) => $formulaFormat := true
- UPCASE(fn) = 'CONSOLE =>
- SHUT $formulaOutputStream
- $formulaOutputStream := mkOutputConsoleStream()
- $formulaOutputFile := '"CONSOLE"
-
- (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file
- if (ptype := pathnameType fn) then
- fn := STRCONC(pathnameDirectory fn,pathnameName fn)
- ft := ptype
- filename := make_full_namestring([fn, ft])
- null filename =>
- sayKeyedMsg("S2IV0003",[fn,ft])
- (testStream := MAKE_OUTSTREAM(filename)) =>
- SHUT $formulaOutputStream
- $formulaOutputStream := testStream
- $formulaOutputFile := object2String filename
- sayKeyedMsg("S2IV0004",['"IBM Script formula",$formulaOutputFile])
- sayKeyedMsg("S2IV0003",[fn,ft])
-
- sayKeyedMsg("S2IV0005",NIL)
- describeSetOutputFormula()
-
-describeSetOutputFormula() ==
- sayBrightly LIST ('%b,'")set output script",'%d,_
- '"is used to tell FriCAS to turn IBM Script formula-style",'%l,_
- '"output printing on and off, and where to place the output. By default, the",'%l,_
- '"destination for the output is the screen but printing is turned off.",'%l,_
- '%l,_
- '"Syntax: )set output script <arg>",'%l,_
- '" where arg can be one of",'%l,_
- '" on turn IBM Script formula printing on",'%l,_
- '" off turn IBM Script formula printing off (default state)",'%l,_
- '" console send IBM Script formula output to screen (default state)",'%l,_
- '" fp<.fe> send IBM Script formula output to file with file prefix fp",'%l,_
- '" and file extension .fe. If not given, .fe defaults to .sform.",'%l,
- '%l,_
- '"If you wish to send the output to a file, you must issue this command",'%l,_
- '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_
- '"IBM Script formula output to the file",'%b,'"polymer.sform,",'%d,'"issue the two commands",'%l,_
- '%l,_
- '" )set output script on",'%l,_
- '" )set output script polymer",'%l,_
- '%l,_
- '"The output is placed in the directory from which you invoked FriCAS or",'%l,_
- '"the one you set with the )cd system command.",'%l,_
- '"The current setting is: ",'%b,setOutputFormula "%display%",'%d)
-
setOutputTex arg ==
arg = "%initialize%" =>
$texOutputStream := mkOutputConsoleStream()
Modified: trunk/src/interp/setvart.boot
===================================================================
--- trunk/src/interp/setvart.boot 2020-03-11 15:55:30 UTC (rev 2648)
+++ trunk/src/interp/setvart.boot 2020-03-14 18:31:03 UTC (rev 2649)
@@ -502,23 +502,6 @@
chkOutputFileName
"console"))
NIL)
- (script
- "display output in SCRIPT formula format"
- interpreter
- FUNCTION
- setOutputFormula
- (("display output in SCRIPT format"
- LITERALS
- $formulaFormat
- (off on)
- off)
- (break $formulaFormat)
- ("where script output goes (enter {\em console} or a a pathname)"
- FILENAME
- $formulaOutputFile
- chkOutputFileName
- "console"))
- NIL)
(scripts
"show subscripts,... linearly"
interpreter
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.