PropForth V5.0 problems
Duane C. Johnson
Posts: 955
I have been trying to get PropForth V5.0 running on my basic plug boards.
I have 64K eeprom, and SD-card on alternate pins [25...22].
After installing "PropForthDevKernel" things seemed to work OK.
I started going through the examples in the PropForthDoc, things worked OK until I got to a word containing c".
UNDEFINED WORD c error occurs.
Then I check to see if c" exists by usind words and there it is 09_812 FIX c".
After checking there are lots of words that don't work even though they seem to be in the dictionary.
What is going on? What am I doing wrong?
Duane J
I have 64K eeprom, and SD-card on alternate pins [25...22].
After installing "PropForthDevKernel" things seemed to work OK.
I started going through the examples in the PropForthDoc, things worked OK until I got to a word containing c".
UNDEFINED WORD c error occurs.
Then I check to see if c" exists by usind words and there it is 09_812 FIX c".
After checking there are lots of words that don't work even though they seem to be in the dictionary.
What is going on? What am I doing wrong?
Duane J
Comments
The c" and the " must be bounded by white space, usually one or more blank spaces.
I think the c" only works inside a definition, it has to be in a wordthat starts with : and ends with ;
Can you post the bit that gives you the problem so I can try to reproduce it?
We tested the snot out of this, I would feel very bad if this is broken.
Yes, there was white space.
I also show the example that works.
Duane J
: test c" Hello Duane" cr .cstr cr st? ;
Prop0 Cog6 ok
test
Hello Duane
ST: 0_000_014_145
Prop0 Cog6 ok
Prop0 Cog6 ok
c" Hello Duane" cr .cstr
Hello DuaneProp0 Cog6 ok
What did you load onto the prop?
I was lazy and simply cut and pasted from "PropForthDoc".
However, that document employs (slanted or curly quote?) which is a character not even on my keyboard.
The correct character is the " (normal strait quote) which is on my keyboard.
Apparently there is a difference.
Bingo, now it works.
Apparently the html document did a switcheroo in the text so one can't directly cut and paste from it.
Maybe the document needs to be edited.
I can do it, actually I already did. Do you want a copy?
Duane J
There is a difference between a DASH and a MINUS -
I replaced all DASHs with MINUSs.
Duane J
We (the forth team) use only standard cheap off the shelf equipment, so we shouldn't have weird characters on the key board.
The docs were written with text copied from the screen, so now we have to figure out where they got switched.
I think something is the tool chain is giving "extra help" in efforts to meet or exceed customer expectations. Which always is annoying.
IF I could impose on you, could you please tell me so I can open a ticket:
1) OS and PC you are using
2) application used to open PropForth.HTML
3) the characters you found that are mis-translated (if there are more after " and -)
4) the terminal program you use to talk to the prop
If I can reproduce the error, I might be able to figure out who is the culprit and take appropriate action. Otherwise I will put in a note about not being able to copy the examples, which would not be the best.
The first work around will be a note that states the examples can't always be copied due to these changes.
Any hints or references for setting a font that doesn't misbehave?
What about Open Office as editor?
I don't want ask Sal to edit the docs twice, or to add html tags by hand.
OPened issue 145 on this. Thanks Duane and everybody!
http://code.google.com/p/propforth/issues/detail?id=145
1. Windows Vista, Toshiba Satellite Laptop,
2. SeaMonkey, a Mozilla/Netscape product.
3. So far just the quote and minus.
4. TerraTerm 4.72, with the "Select only by Left Button paste mode.
My editor is Edit+ v3.11. The Edit+ internal browser showed the same thing.
I simply used the search and replace function to fix the document.
I can't repeat it now that I replaced the offending characters.
Hmmm I could download the document again. Here is a clip from the original document:
sc c Hello world cr st? cr .cstr cr st? with bad quote
sc : test3 begin st? 1 dup 0 = st? until ; 3 test3 with bad dash
And my edited clips:
sc c" Hello world" cr st? cr .cstr cr st? with good quote
sc : test3 begin st? 1 - dup 0 = st? until ; 3 test3 with good minus
Duane J
If I cut/paste sample code from the actual word document (PropForth.docx), the examples work. The quotes are real generic quotes as expected.
If I cut/paste from the .html (in Firefox 12.0 in my case), the quotes are opening and closing quotes and don't work with the Forth code.
Both cases are being pasted into Tera Term 3.1.3 and the EEPROM kernel.
The HTML doc has the same font as Word (Lucida Console) - the quote characters in the HTML source appear to be opening and closing quotes in the HTML document source.
The double quote in the Word doc can be created by using the double quote on the keyboard. In the HTML doc, the double quote used in HTML tags appears to be the standard double quote as typed on the keyboard in whatever font you are currently using. The quote around the Hello world is a differently displayed double quote in the HTML doc.
I assume the .HTML was created from Word and not some other tool.
More investigation to come as the basketball game continues - Go Bucks!!
I haven't checked if LibreOffice has the same issues.
Turn turn them off and fix with Word 2003 and 2007: http://news.cnet.com/8301-13880_3-9835631-68.html
For Word 2010: Click on the "File" tab, click on "Options", click on "Proofing", click on "Auto Correct Options", click on "Auto Format as You Type" tab. On that tab is a checkbox for "Replace Straight Quote with Smart Quotes" - make sure that box is NOT checked.
If you have an existing document at this point that you want to fix, you can use "Replace" and just type a double quote in both the "Find" and "Replace" box and say "Replace All".
I did that with the PropForth.docx file and then saved it as an HTML to create the attached (zipped) file. The examples I've tried cutting and pasting from the attached have worked.
You learn something new everyday!!
Now I see that Rick has done some investigation, and may have solved the whole issue.
Thanks! I'll add this to the issue and forward it to Sal, I think you've saved us a bunch of time!