Frequently Asked Questions
Although we do our best to prepare accurate and readable documentation, sometimes readers miss important things and other times the documentation is unclear or misleading. The questions here reflect items that are either easily missed or need to be clarified in the documentation; as the latter sort are corrected by revisions they are removed from the FAQ.
Q. I get to a place from time to time where I'm doing a number entry and "num" shows up on the right but no number shows up on the left. The number enters correctly. A "warm" does not clear it but if I enter a nonsense word it starts working correctly.
A. That sounds like the data stack has underflowed. The arrayForth interpreter doesn't check for stack underflow. When you type a nonsense word you trigger "abort" which does check for underflow and resets the stack pointer. Also, the word "c" clears the stack. Actually it resets the stack pointer, so if the stack has underflowed or if you just want to empty the stack you can reset it without aborting by typing "c".
Q. I edit a block, and as I leave, there are some words that I've deleted and don't want any more (using x). Now, I can paste them back in any block with `i'. Which is ok. BUT, I have two keys that maps to i (on either side of the spacebar). So, if I'm editing a buffer, and want to alt-tab to a different window, I paste a word from the clipboard as I switch windows. Bah! If I don't spot this right away, and leave it there... and later do a 'save'. Well, it could lead to really hard to track down bugs.... Of course the 'audit check all' will help here... but still.
A. colorForth does not use the windows clipboard. When you cut (or copy) words from a block they live in a memory buffer ("trash") that belongs to the instance of colorForth you are running, are available only within that instance, and are discarded only when colorForth exits *or* when you do a warm start with warm . Chuck did not provide a way to empty the trash buffer and we have not added such as yet either.
Q. When using Linux can my serial ports be the same every time I plug in my eval board?
A. This has worked for us, once again using Ubuntu 11.04.
Attach a USB cable to your eval board and plug it into your Linux machine. Now type ls /dev/serial/by-id . What I saw was a link whose very long name included the serial number of my board. This is a link to /dev/ttyUSB0 or whatever tty device was assigned to this port of your board. Make a link to this device in ~/.wine/dosdevices and it will work everytime you plug in this port of this board on this computer.
You still need to set the serial port parameters as before, but substitute this new very long device name for /dev/ttyUSB0 , for example, in linuxwine.bat or okad.sh depending on which you are using. Here's a .sh script file to start up arrayForth in one environment:
stty -F /dev/serial/by-id/usb-GreenArrays_EVB001_Port_A_GAEVB001S0003A-if00-port0 \
921600 -parenb cs8 -cstopb -crtscts raw -echo
stty -F /dev/serial/by-id/usb-GreenArrays_EVB001_Port_C_GAEVB001S0003C-if00-port0 \
921600 -parenb cs8 -cstopb -crtscts raw -echo
./Okad2-41b-pd.exe
Q. How do I change variable values from the interpreter?
From the arrayForth User's Manual section 3.1.4.5, Magenta Variable Name Entry "... Display a block containing a variable and change the variable using the interpreter."
I tried to type the new value followed by the variable name, but only get varname? as response. So the interpreter doesn't seem to know about it.
A. The interpreter only recognizes variables when they have been compiled. Load the block with the variable definition in it. Type, for example, "1 varname !" without the quotes. You should see the value 1 in green next the magenta variable in the source block. If you type save now, this value will persist. The manual will be updated to clarify this.
