Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: nephyte needs f83 examples & examples Message-ID: <2845.UUL1.3#5129@willett.pgh.pa.us> Date: 4 Jun 91 02:40:54 GMT Organization: (n.) to be organized. But that's not important right now. Lines: 56 Category 1, Topic 33 Message 40 Sun Jun 02, 1991 F.SERGEANT [Frank] at 23:07 CDT Maybe I shouldn't butt in regarding your Atari & F83 questions, Paul, but I will anyway. I don't have an Atari so I'll assume you have a version of F83 that is almost identical to the IBM PC version and make my suggestions accordingly. What you should do to start with is _read_ the documentation that comes with F83. It should tell you how to approach becoming familiar with F83. Most of its documentation is not in the form of text files, manuals, etc., so it should be a simple matter to read what _is_ in such form. Then follow its suggestions regarding VIEWing words. Use VIEW on a likely prospect (such as OPEN or CREATE-FILE) to get you into the general area of the source code. Then read the source code and the shadow screens that go with it. Don't just read the one screen that VIEW throws you into: also read the surrounding screens (using N and B or whatever the editor commands are that move forward one screen or back one screen; A should switch between source and shadow screens). Make note of other words used within the definitions of the word you are VIEWing so you can VIEW those words also. A way to get likely candidates to VIEW is to type WORDS and see the words in the vocabulary. Beware that some of the words you need to research may reside in a different vocabulary (such as DOS or HIDDEN or ???) so you may need to change vocabularies and do WORDS several times. Eventually you will be able to find the exact word to create a new file, _and_ its stack comment (so you'll know how to use the word). This is one of the beauties of a system that comes with complete source code. Your method of copying an existing file to a new name and erasing all its text and then using the file for your own purpose is also a perfectly workable method for making a new file. Now, _why_ didn't that Starting Forth example you typed in work? Again, you should research it. To do this you should study the example to understand what it is doing and how it goes about it. Then try typing in the example word by word (you can't type in the looping, branching, >R R@ R> type words), checking the stack after each one, perhaps DUMPing memory or checking the values of VARIABLEs, in order to actually see what is happening. (By typing in the example, I mean to execute the parts of each definition, one by one, from the keyboard.) Another possibility is to use F83's trace or debug facility, but I might recommend you delay that until you've tried the method I just suggested. By using this system you will locate an F83 word that doesn't do what you expected it to from the Starting Forth example. Then use VIEW and study its source and shadow code until you understand the difference and can adjust for it. If you follow these suggestions, please post a follow up letting us know how it all works out. -- Frank ----- This message came from GEnie via willett. You *cannot* reply to the author using e-mail. Please post a follow-up article, or use any instructions the author may have included (USMail addresses, telephone #, etc.). Report problems to: dwp@willett.pgh.pa.us _or_ uunet!willett!dwp