Tuesday, June 15, 2010

Translator – PRINT Command (Release)

The original plan was put all the command test inputs into one set, but the set grew quite large when the PRINT tests were added and especially when all the error test inputs were also added. Therefore, new separate sets were created for the PRINT tests and the error tests. The lone PRINT statement at the end of the LET command tests remains (though it no longer causes a “BUG: not yet implemented” error).

One last thing, it was previously mentioned that the standard C libraries being used with GCC include a command history of the inputs entered in the interactive test input mode, accessed by the up and done arrows. I accidentally discovered a few more features using the function keys (found when F7 was entered in the MSYS window instead of the VIDE2 window where it is the build program shortcut key). These features are:
F1 – Copy one character from previous input at current position
F2 – Pops up a window asking for a character, then copies characters from current position from previous input up to that character
F3 – Copies all characters from previous input at current position
F4 – Pops up a window asking for a character to delete to, then deletes up to the character
F5 – Does the same thing as up-arrow
F6 – Puts Control-Z into buffer (not sure what this is for, possibly Control-Z is an end of file marker from the old DOS days)
F7 – Pop up a window showing are previously entered inputs (each numbered), which can then be selected
F8 – Display previous input (same as up-arrow except rotates around, but only when cursor is a beginning of line)
F9 – Pop up window asking for a Command Number
The Page Up and Page Down go to the first and last inputs saved. I also noticed it seems to remember the inputs even between runs, I'm not sure where it stores this between terminating the program and starting it back up.

Anyway, the Translator now has support for the PRINT command and PRINT functions and ibcp_0.1.13-src.zip has been uploaded at Sourceforge IBCP Project along with the binary for the program. A lot of changes were required to get the PRINT command implemented, the implementation of next command (INPUT) should be easier. Now to get the rest of the error handling working correctly...

No comments:

Post a Comment

All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)