ForthNet@willett.UUCP (ForthNet articles from GEnie) (05/28/90)
Date: 05-26-90 (17:08) Number: 401 (Echo) To: ALL Refer#: NONE From: JOSE BETANCOURT Read: (N/A) Subj: LIBRARIES Status: PUBLIC MESSAGE Is the ANSI Forth standard going to address the issue of standard libraries, as in the ANSI C effort. Or will it just have a few words for strings, floats, etc., and the user must somehow create a usable language as in Fig Forth, Forth 79, and 83? ----- This message came from GEnie via willett through a semi-automated process. Report problems to: uunet!willett!dwp or willett!dwp@hobbes.cert.sei.cmu.edu
ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (02/04/91)
Category 10, Topic 28 Message 106 Sat Feb 02, 1991 B.RODRIGUEZ2 [Brad] at 23:38 EST Good list, Mitch. Here's another: 5) You can't execute control structures interpretively. (This also applies to many implemenations of TO.) Of course, you can't do this in any current Forth except yours and John Hayes' (to my knowledge). This is something I miss from STOIC (yes, I once used STOIC), and it's one of the _hardest_ things for me to get across to a new Forth programmer. Another stumbling block for new programmers: 6) You can't compile in-line string arguments. Meaning, arguments which are taken from the input stream. It's painful to explain, to a neophyte who's tired of typing INCLUDE" commands, why you can't write a shorthand word : L INCLUDE" TEST.FTH" ; The first has been solved (but good luck getting it into ANSI). The only solution to the second that I'm aware of would use the STOIC method of passing string arguments. Food for thought. - Brad P.S. would you clarify your item 3) "no convenient way to compile a string within a definition"? ----- This message came from GEnie via willett. You cannot Reply to the author using email. Please post a follow-up article, or use any instructions the author may have included (USMail addresses, telephone #, whatever). Report problems to: dwp@willett.pgh.pa.us or uun
ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (02/09/91)
Category 10, Topic 28 Message 107 Fri Feb 08, 1991 B.RODRIGUEZ2 [Brad] at 19:57 EST Here's something else which (to my mind) cannot be implemented _efficiently_ in a portable way using ANS Forth. Even the inefficient ways are difficult. : || IF R> DROP -1 THEN ; ( t - t) ( f - ) ( exit on true) : && 0= IF R> DROP 0 THEN ; ( t - ) ( f - f) ( exit on false) I've named these in honor of the "C" operators they mimic. Marla Bartel named them TEXIT and FEXIT, respectively, in The Computer Journal #43. I have used these words since about 1985 on a variety of systems, and I have found them _very_ useful to build parsers (sigForth Newsletter, pending), pattern matchers (FORML '89), and expert systems (Rochester '90). Their dependence on return-stack manipulation means that they can't be implemented portably in ANS Forth. I've implemented similar words using conditional branches -- requiring a closure word -- but the result is incredibly clumsy, noticeably slower, and requires roughly twice the memory in my typical applications. Perhaps I should submit these words for consideration. :-) - Brad ----- This message came from GEnie via willett. You cannot Reply to the author using email. Please post a follow-up article, or use any instructions the author may have included (USMail addresses, telephone #, whatever). Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp