Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!ucsd!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM (Mitch Bradley) Newsgroups: comp.lang.forth Subject: Re: BASIS 14... comments Message-ID: <9011302145.AA09747@ucbvax.Berkeley.EDU> Date: 30 Nov 90 21:11:50 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Mitch Bradley Organization: The Internet Lines: 170 > > Summary of BASIS 14 Changes (John Rible's unofficial report) > > Added Words: > > To Core ext; > > CASE OF ENDOF ENDCASE > To CORE??? Extended Core would be better. Anyway, what is the stack behavior? "Core ext" is Extended Core. The committee changed its mind about whether the "EXT" goes before or after the base wordset name. > > REFILL > What it does? It's like QUERY, but it returns a flag denoting whether or not the operation succeeded. In other words, an end-of-file flag. > > COMPILE > So, we have COMPILE but we don't have [COMPILE] ... and we have POSTPONE > also, that's right? [COMPILE] and POSTPONE are in CORE, COMPILE is in CORE EXT > > C" MS MARKER > What they do? C" ( "string" -- adr ) Compiles a counted string ( " has been renamed to S" ) MS ( n -- ) Delays at least n milliseconds MARKER ( "name" -- ) Defines a word that, when later executed, empties the dictionary back to where it was before MARKER was executed. This can also clean up other resource allocations, such as the user area, and unlink any linked structures that the compiler maintains. > > To File; SAVE-INPUT RESTORE-INPUT FILE-STATUS > What they do? SAVE-INPUT ( -- w1 w2 w3 ) RESTORE-INPUT ( w1 w2 w3 -- flag ) SAVE-INPUT remembers the current input stream position on the stack and RESTORE-INPUT restores the input stream to a previously-saved position. The flag tells whether or not it succeeded. FILE-STATUS ( adr len -- false | w true ) If the named file exists, returns true and an implementation- defined number "w" giving additional system-dependent information about the file. Otherwise returns false. For example, under Unix, "w" would be the address of a "stat" struct. > > WRITE-LINE > Instead of WRITE-CR ? So WRITE-CR now can be defined as a WRITE-LINE with an > empty string? Yes. > > RESIZE-FILE REPOSITION-FILE > What they do? Exactly, I mean... RESIZE-FILE changes the file size, truncating or extending as necessary. This operation may fail on some operating systems. REPOSITION-FILE is like SEEK but the position is always absolute. If you want to do relative seeking or seeking backwards from the end, you have to call FILE-SIZE or FILE-POSITION and do some arithmetic. > To File ext; FLUSH-FILE > > To Float ext; F" > Yes? What it does? That should be F~ (tilde, not quote). It means "approximately equal". There is an argument that, if positive, is the absolute value of the allowable difference, and if negative, is the relative difference. > Deleted Words: > From File; WRITE-CR > > SEEK-FILE > Oh, oh! Why? Replaced by REPOSITION-FILE , which is easier to use and more straightforward in most cases. > > " renamed S" in Core and Programmer > Why? Some existing systems use " to mean the address of a counted string, others use it to mean an "adr len" string. We didn't want to break existing code. > > ORDER from Non-portable to Search ext > Problems. My programs often use ONLY and ALSO, but never ORDER. With ORDER I > need the name (string)... and now the ANS Compatibles can't tell me that > I have ONLY and ALSO if they don't have ORDER. But I'll not lost my sleep... Not true. An implementation can provide selected words from a wordset, so long as it documents it clearly, e.g. "includes the words ONLY and ALSO from the SEARCH ORDER EXTENSION" wordset". It can also provide some words in source form. > > [COMPILE] made "non-obsolescent" in Core ext > ??? Can someone explain this to me with more words? "Obsolescent" means the word will automatically go away in the next standard (years from now) with no explicit action necessary. Making [COMPILE] non-obsolescent means that it will NOT automatically go away. By the way, now that we have COMPILE, (compile-comma), the words POSTPONE , [COMPILE] , and COMPILE are all unnecessary, as the desired effects may be achieved with ['] foo EXECUTE and ['] foo COMPILE, > > Cell and Floating-point number sizes are intregal multiples of character > > size. Nested compilation of definitions is disallowed > ??? What this mean? What are the pratical effects? The integral multiple thing implies that it is possible to store cell values and floating point values within files and arrays. Without that restriction, it wasn't clearly possible. Disallowing nested compilation means that a Standard Program can't do something like: : FOO LOCAL x LOCAL y [ START: ] LOCAL x LOCAL y [COMPILE] ; ; In other words, the compiler loop in a Standard System is not required to be re-entrant. (Nestable compilers are not disallowed, but a portable program may not assume that the compiler is itself nestable). > > Beyond scope of Standard to specify termination condition of ACCEPT or > > EXPECT > :-((((( But I can understand. For the benefit of those who may not understand, the function of ACCEPT and EXPECT, so far as a program is concerned, is to deliver an input line of at most n characters. The precise set of user actions necessary to prepare and terminate that line is not specified by the standard. The line editing function is often under the control of an external operating system, and cannot always be modified by the Forth system implementor. Basis 14 will *recommend* some behavior, such as "an explicit should be required, rather than automatically 'waking up' after n characters", but that will not be a required behavior. > > 18 proposals still pending > Oh no! :-) Multitasking is still pending. Should be an interesting discussion! Mitch Bradley, wmb@Eng.Sun.COM