baconwaifu / propforth

Automatically exported from code.google.com/p/propforth
0 stars 0 forks source link

Section 3.4.3 of the Propforth Documentation should be clearer #186

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, section 3.4.3 states: \ . ( n1 -- ) prints the signed number on the 
top of the stack

While this is accurate, this example also pops the top value off the stack and 
should state so.  It isn't evident in the comment and only became clear after I 
examined what the code was doing.

Original issue reported on code.google.com by mcgrud...@gmail.com on 7 Feb 2013 at 4:17

GoogleCodeExporter commented 8 years ago
This was the first that I found.  It seems that sections 3.4.x act like this.  
Possibly it should be stated that printing the topmost value on the stack or 
operating on values automatically pop them off the stack.  Note that this might 
be assumed by some people, I just didn't know about it.

Original comment by mcgrud...@gmail.com on 7 Feb 2013 at 4:21

GoogleCodeExporter commented 8 years ago
the "stack note" is intended to convey this:
 ( n1 -- )  is supposed to mean:

"Start this word with n1 on the stack.  After this word executes, n1 will be 
gone from the stack, and nothing will be deposited on the stack. "

There was supposed to be mention of this in the early sections of 
propforth.htm. 
If its not there, we might want to add it. If it is there, we might want to 
repeat it, or re-phrase it. 

Original comment by prof.bra...@gmail.com on 8 Feb 2013 at 4:48

GoogleCodeExporter commented 8 years ago
I think this is covered adequately in the last paragraph of 3.3 Stack. If you 
this we need to expand on this please open another issue.

Original comment by salsa...@gmail.com on 23 Feb 2013 at 10:11