wsbusup4@rw5.urc.tue.nl (Jan Stout) (05/06/91)
8.2.0742 AT-XY Ok, now we can set the cursor, but how do we read it? 8.2.1645 GET-DATE Where is SET-DATE? 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. 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) 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) Jan Stout, wsbusup4@urc.tue.nl
glenn@ready.com (Glenn Kasten) (05/06/91)
In article <587@rc6.urc.tue.nl>, wsbusup4@rw5.urc.tue.nl (Jan Stout) writes: |> |> 8.2.1645 GET-DATE |> |> Where is SET-DATE? |> 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. |> I agree that there should be a SET-DATE. I disagree that GET-TIME should be a separate word, as that would introduce a race condition when you need to get both the date and time at midnight. It is unclear from the specification whether GET-DATE returns the local date and time, or universal coordinated time. I suggest that the interface be changed to look more like POSIX.1's support for date and time - a lot of work went into making that interface be (mostly) complete. -- Glenn Kasten Ready Systems 470 Potrero Ave. Sunnyvale CA 94086 glenn@ready.com (408) 522-7357
Mitch.Bradley@ENG.SUN.COM (05/07/91)
> 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