login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #371 iprint from InternalPrintPackage makes malformed call to FORCE-OUTPUT revision 1 of 2

1 2
Editor:
Time: 2007/11/17 22:34:07 GMT-8
Note: fixed and commited

changed:
-
Alasdair McAndrew points out that calls to iprint results in a hard error.  He writes:

I was running a long program recently, and every now and again I wanted a
little output to indicate how far the program had got.  The "output" command
includes a line feed, which I don't want.  I've tried::

 )set expose add constructor IPRNTPK

but then, for example::

 for i in 1..10 repeat iprint(i::String)

produces the output::

 1
    >> System error:
    FLUSH is invalid as a function.


Although not exactly reproducable on Silver, there is an error and the fix appears to be::

 --- a/src/algebra/newdata.spad.pamphlet
 +++ b/src/algebra/newdata.spad.pamphlet
 @@ -49,7 +49,7 @@ InternalPrintPackage(): Exports == Implementation where
    Implementation == add
       iprint(s:String) == 
            PRINC(coerce(s)@Symbol)$Lisp
 -          FORCE_-OUTPUT$Lisp
 +          FORCE_-OUTPUT()$Lisp





From swilson Wed Jul 11 22:58:31 -0500 2007
From: swilson
Date: Wed, 11 Jul 2007 22:58:31 -0500
Subject: fixed and commited
Message-ID: <20070711225831-0500@wiki.axiom-developer.org>

Status: testing => pending (next release) 


Submitted by : (unknown) at: 2007-11-17T22:34:07-08:00 (16 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

Alasdair McAndrew? points out that calls to iprint results in a hard error. He writes:

I was running a long program recently, and every now and again I wanted a little output to indicate how far the program had got. The "output" command includes a line feed, which I don't want. I've tried:

 )set expose add constructor IPRNTPK

but then, for example:

 for i in 1..10 repeat iprint(i::String)

produces the output:

 1
    >> System error:
    FLUSH is invalid as a function.

Although not exactly reproducable on Silver, there is an error and the fix appears to be:

 --- a/src/algebra/newdata.spad.pamphlet
 +++ b/src/algebra/newdata.spad.pamphlet
 @@ -49,7 +49,7 @@ InternalPrintPackage(): Exports == Implementation where
    Implementation == add
       iprint(s:String) == 
            PRINC(coerce(s)@Symbol)$Lisp
 -          FORCE_-OUTPUT$Lisp
 +          FORCE_-OUTPUT()$Lisp

fixed and commited --swilson, Wed, 11 Jul 2007 22:58:31 -0500 reply
Status: testing => pending (next release)