Problem with display output 
Author Message
 Problem with display output

Hello,

I'm guessing this will turn out to be an embarrassing newbie error, but here
goes:

I've got code which loops over consecutive decibel values, computes the
efficiency then uses display to output the results.  The code within the
(let loop ) looks like this

(display decibels)
(display \#tab)
(display efficiency)
(newline)

the problem is the output doesn't look like this (the way I want it to look):

0    1
-1   .50
-2   .75
etc.

It looks like this:

01
-1.50
-2.75
etc.

Does the display for the tab character need to have quoted in it, i.e.:

(display '\#tab)

?

TIA



Sun, 17 Mar 2002 03:00:00 GMT  
 Problem with display output
+---------------
| (display \#tab)
+---------------

Don't you mean (display #\tab)??  Anyway, it works fine for me:

        > (define (d2num x y)
            (display x)
            (display #\tab)
            (display y)
            (newline))
        > (for-each d2num '(12 34 56) '(98 76 54))
        12      98
        34      76
        56      54
        >

Perhaps the terminal you're running on doesn't support tabs?

-Rob

-----

Applied Networking              http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.          Phone: 650-933-1673
1600 Amphitheatre Pkwy.         FAX: 650-933-0511
Mountain View, CA  94043        PP-ASEL-IA



Tue, 19 Mar 2002 03:00:00 GMT  
 Problem with display output

Quote:


>+---------------
>| (display \#tab)
>+---------------

>Don't you mean (display #\tab)??  Anyway, it works fine for me.

I typo'd when I typed the program, did not notice and then duplicated the typo
in the post.  You're correct. Thanks.


Tue, 19 Mar 2002 03:00:00 GMT  
 Problem with display output

Quote:

> Hello,

> I'm guessing this will turn out to be an embarrassing newbie error, but here
> goes:

> I've got code which loops over consecutive decibel values, computes the
> efficiency then uses display to output the results.  The code within the
> (let loop ) looks like this

> (display decibels)
> (display \#tab)
> (display efficiency)
> (newline)

> the problem is the output doesn't look like this (the way I want it to look):

> 0    1
> -1   .50
> -2   .75
> etc.

> It looks like this:

> 01
> -1.50
> -2.75
> etc.

I think you mean (display #\tab).
You seem to have transposed the # and the \.
I'm guessing your implementation has references to undefined variables
return (void) or something, instead of causing an error the way mine does.

--Jed

"But life wasn't yes-no, on-off.  Life was shades of gray, and rainbows not
in the order of the spectrum."   -- L. E. Modesitt, Jr., _Adiamante_



Thu, 21 Mar 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. problem: display command output / kill command

2. rxvt + python problem: script output buffered and interactive output missing

3. VX-REXX... Display Output

4. How To Output To A File Like Using $display

5. How To Output To A File Like Using $display

6. How To Output To A File Like Using $display

7. sending output from display to a file

8. display and manipulation of Verilog output

9. Displaying numerical output

10. Windows python 2.2.1 IDLE glitch - unittest output display nothing

11. Display console output to status bar in Tkinter?

12. Displaying entire output.

 

 
Powered by phpBB® Forum Software