Export to GitHub

pforth - issue #11

Stack<10> Always shown in output


Posted on Feb 25, 2011 by Quick Panda

What steps will reproduce the problem? 1. Enter: 1 2 +

What is the expected output? What do you see instead? Expected output is 'ok', but I got instead 'ok Stack<10> 3'.

What version of the product are you using? On what operating system? Using version: v27 2011 11 21

Please provide any additional information below.

OS: Windows 7 Built with: Visual Studio 10 Express Build: Default release build.

Comment #1

Posted on Feb 28, 2011 by Quick Panda

Update: This is a debug mode that is turned on by default, it should be turned off by default or switched based on if you are building a default or release version of PForth.

Comment #2

Posted on Feb 28, 2011 by Swift Panda

The display of that stack contents can be turned off using:

TRACE-STACK OFF

At the end of "system.fth" is where it gets turned on. I think most people who are building Forth like to see the stack. But I will try to figure out how to make the conditional Makefile build a "release" version without the stack trace.

Comment #3

Posted on Sep 18, 2012 by Happy Kangaroo

Can't seem to turn it off in the build. Can turn it off as stated after starting pforth. Would like it to be off by default unless I turn it on in system.fth perhaps.

Comment #4

Posted on Sep 18, 2012 by Swift Panda

Right. Changing it in system.fth does not work.

This variable is from the kernel so it is initialized when pForth loads. You can disable it by setting the initial value to zero near line 101 of "pf_core.c".

gVarTraceStack = 0;

You might want to make the following change:

ifdef DEBUG

gVarTraceStack = 1;

else

gVarTraceStack = 0;

endif

Comment #5

Posted on Sep 20, 2012 by Happy Kangaroo

This worked fine. Also thanks for the notice about the fsin, etc. math functions. Work great!

Has anyone added a way to run a system command like? $ ls -al where $ means rest of line is a system command?

Also, in a similar vein, the ability to run gnuplot in any fashion? I can add it as a custom function, I suppose, just wanting to check first.

Status: New

Labels:
Type-Defect Priority-Medium