Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!ucsd!ucbvax!ENG.SUN.COM!Mitch.Bradley From: Mitch.Bradley@ENG.SUN.COM Newsgroups: comp.lang.forth Subject: Re: misc ?s on BASIS15 Message-ID: <9105061917.AA00426@ucbvax.Berkeley.EDU> Date: 6 May 91 17:55:11 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Mitch.Bradley%ENG.SUN.COM@SCFVM.GSFC.NASA.GOV Organization: The Internet Lines: 54 > 8.2.0742 AT-XY > Ok, now we can set the cursor, but how do we read it? You can't. A lot of terminals don't allow you to read the cursor position, and to entitle a program to read the cursor position would force the Forth implementation to interpose a software layer in the output stream that would model exactly what the terminal is doing. Hopelessly complicated, and of questionable value. > 8.2.1645 GET-DATE > > Where is SET-DATE? Nowhere. Presumably the operating system has some means for setting the correct date, and you only need to do it infrequently. I have had a SET-DATE function in my Forth system for many years, and I have NEVER used it, other than to test that it works. > Furthermore I think DATEs should only refer to day/month/year > so I suppose GET-TIME (and SET-TIME) for the sec/min/hour would be > better. At least it would reduce the ridiculous number of > stackentries. They need to be combined into one function so the application program doesn't have to go to great lengths to ensure that it is getting a consistent sample. Suppose you call GET-DMY just before midnight, and the clock ticks before you call GET-HMS. The aggregate time that you come up with is wrong by 24 hours. If the stack entries bother you, you can define whatever function you want on top of the 6-stack-entry version. > 15.1.1643 GET-CURRENT > 1647 GET-ORDER > 2195 SET-CURRENT > 2197 SET-ORDER > > Why not use @ and ! prefixes instead of the GET- and SET-? > (The same would apply to 8.2.1645) I put it to a vote at last year's FORML conference, and GET/SET won. The @ and ! versions were included in the ballot. > 16.1.0245 /STRING > > I suppose the defintion should read: > > ...begins n characters beyond c-addr1 and is n characters shorter... > ^ ^ > (In BASIS15 u1 is used at the ^s) The ability to lengthen a string is fraught with danger. Mitch.Bradley@Eng.Sun.COM