Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #28590
| From | Gerry Jackson <gerry@jackson9000.fsnet.co.uk> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: How to get an address for a string by direct user input without using PAD |
| Date | 2014-02-19 22:25 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <le3avs$apt$1@dont-email.me> (permalink) |
| References | <153253e8-4cb9-4438-8357-9dd8872388a4@googlegroups.com> <f2ed5b12-6c7b-459c-9415-6038f64252d3@googlegroups.com> <53040276$0$9245$e4fe514c@dreader35.news.xs4all.nl> <le1ne8$s74$1@dont-email.me> <53050fa2$0$25258$e4fe514c@dreader34.news.xs4all.nl> |
On 19/02/2014 20:10, Albert van der Horst wrote: > In article <le1ne8$s74$1@dont-email.me>, > Gerry Jackson <gerry@jackson9000.fsnet.co.uk> wrote: > <SNIP> >> >>> >>> REFILL is a somewhat obscure word. >> >> Nonsense, nothing obscure about it. It fetches a line of input from the >> current input source if that source can supply it. > > REFILL behaves differently if input from a string a block, the console > or a file. It fetches it to a buffer that is under control of the > Forth system, and can be accessed properly only by a protocol. I don't know what you mean by this. The input returned by REFILL can be accessed by executing SOURCE e.g. : get-line ( -- caddr u ) refill 0= throw source ; get-line will return the input that REFILL obtained whether the current input source is from the console, a string, a block or a file. GET-LINE is a simple definition not a protocol. It is a > system word and cannot by a novice be used for straightforward input > without great danger. What danger? Who says it is a system word - it's defined in the standard as a word to obtain text from the current input source independent of what that source might be. ISTM that this makes it more of a user word than a system word. Please note that the context is that I talk to > someone who is writing an application program. > Paint me green if obscure is not an appropriate expression. I'll get my green pot of paint out. > >> >> You don't need it. ciforth has >>> : REFILL FALSE ; >>> and is doing just fine. ] >>> >> >> That is a useless definiton of REFILL. ciforth can clearly accept >> console input otherwise ACCEPT wouldn't work - so what's the logic >> behind REFILL telling a lie? > > ciforth's REFILL doesn't lie. Because ciforth always reads in the > whole input source, unless it's keyboard input because it can't - it hasn't been typed yet. In that case it should accept whatever the user types as the next line of input. That's what every other ANS Forth system I've tried does. I also think you'll find that other Forth systems that read the whole of an input file for compilation/interpretation will, if REFILL is executed, return the next line of text that would have been interpreted/compiled. If they don't they are not ANS Forth compliant - neither is ciforth which is why I say ciforth's REFILL tells a lie (unless of course it is truly at the end of the file). its REFILL has nothing to do and just tells that > there is no more input available. (You're right that the system needs > a REFILL-TIB, but you never want to use it directly.) A user might want to do so e.g. a word has been defined using REFILL and the user wants to test it using the keyboard. Also a user might want keyboard input without having to use ACCEPT because WORD, PARSE or PARSE-NAME can be used on it which can't be directly done with whatever ACCEPT returns. > > There is some lack of ANSI conformity here, but it amounts to missing > words. No, I think you are mis-interpreting what REFILL should do. > > By the by has anyone a test set for REFILL? My core extension tests for SAVE-INPUT and RESTORE-INPUT rely on REFILL working correctly when the input source is a file or a string. Nobody has yet reported that as being a faulty test. Testing REFILL on console input can't be done automatically any more than it can for ACCEPT -- Gerry
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-08 18:26 -0800
Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-09 12:18 +0000
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-09 20:00 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 15:47 -0800
Re: How to get an address for a string by direct user input without using PAD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-09 13:02 +0000
Re: How to get an address for a string by direct user input without using PAD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-09 13:12 +0000
Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-09 08:48 -0800
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 16:22 -0800
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 16:22 -0800
Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-09 08:47 -1000
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-09 18:13 -0800
Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-10 02:27 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-14 01:20 -0800
Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-18 14:14 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-18 20:11 -0800
Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-19 06:56 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-18 21:17 -0800
Re: How to get an address for a string by direct user input without using PAD Steve <jsgrahamus@yahoo.com> - 2014-02-10 19:29 +0000
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-14 01:34 -0800
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 16:25 -0800
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 16:59 -0800
Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-11 16:58 -1000
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-12 16:07 -0800
Re: How to get an address for a string by direct user input without using PAD Paul Rubin <no.email@nospam.invalid> - 2014-02-12 16:46 -0800
Re: How to get an address for a string by direct user input without using PAD Paul Rubin <no.email@nospam.invalid> - 2014-02-12 16:47 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 15:53 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 15:52 -0800
Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-12 14:32 -1000
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-12 17:13 -0800
Re: How to get an address for a string by direct user input without using PAD Paul Rubin <no.email@nospam.invalid> - 2014-02-12 18:56 -0800
Re: How to get an address for a string by direct user input without using PAD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-13 08:40 +0000
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 17:16 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 16:32 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-14 01:11 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-15 12:15 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-15 17:35 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-14 12:02 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-15 12:57 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-15 18:12 -0800
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-15 19:10 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-15 19:34 -0800
Re: How to get an address for a string by direct user input without using PAD "Alex McDonald" <blog@rivadpm.com> - 2014-02-16 09:48 +0000
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-16 03:21 -0800
Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-17 12:38 +0000
Re: How to get an address for a string by direct user input without using PAD Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-02-17 08:09 -0600
Re: How to get an address for a string by direct user input without using PAD Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-17 19:32 +0100
Re: How to get an address for a string by direct user input without using PAD "Alex McDonald" <blog@rivadpm.com> - 2014-02-17 14:53 +0000
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-17 20:48 -0800
Re: How to get an address for a string by direct user input without using PAD "Alex McDonald" <blog@rivadpm.com> - 2014-02-18 16:21 +0000
Re: How to get an address for a string by direct user input without using PAD Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2014-02-16 09:32 +0100
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-16 03:07 -0800
Re: How to get an address for a string by direct user input without using PAD Alexander Skobelev <al.skobelev@gmail.com> - 2014-02-16 10:09 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-16 15:39 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-17 19:54 -0800
Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-17 19:51 -1000
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-18 16:40 -0800
Re: How to get an address for a string by direct user input without using PAD humptydumpty <ouatubi@gmail.com> - 2014-02-18 11:44 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-18 15:18 -0800
Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-18 14:48 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-18 16:00 -0800
Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-19 01:01 +0000
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-18 18:11 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-18 18:19 -0800
Re: How to get an address for a string by direct user input without using PAD humptydumpty <ouatubi@gmail.com> - 2014-02-19 11:41 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-19 16:24 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-19 23:08 -0800
Re: How to get an address for a string by direct user input without using PAD Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2014-02-20 13:11 +0000
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-20 21:10 -0800
Re: How to get an address for a string by direct user input without using PAD humptydumpty <ouatubi@gmail.com> - 2014-02-20 22:42 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-21 22:16 -0800
Re: How to get an address for a string by direct user input without using PAD humptydumpty <ouatubi@gmail.com> - 2014-02-20 12:04 -0800
Re: How to get an address for a string by direct user input without using PAD Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2014-02-19 07:45 +0000
Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-19 20:10 +0000
Re: How to get an address for a string by direct user input without using PAD Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2014-02-19 22:25 +0000
Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-20 12:10 +0000
Re: How to get an address for a string by direct user input without using PAD Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2014-02-20 13:10 +0000
Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-20 17:11 +0000
Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-15 16:34 -1000
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-15 19:06 -0800
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-15 19:22 -0800
Re: How to get an address for a string by direct user input without using PAD "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-13 02:56 -0500
Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-12 22:13 -1000
Re: How to get an address for a string by direct user input without using PAD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-13 08:56 +0000
Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-13 11:57 +0000
Re: How to get an address for a string by direct user input without using PAD "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-13 02:56 -0500
Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-12 14:56 +0000
Re: How to get an address for a string by direct user input without using PAD mhx@iae.nl - 2014-02-12 11:24 -0800
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-12 15:48 -0800
Re: How to get an address for a string by direct user input without using PAD Paul Rubin <no.email@nospam.invalid> - 2014-02-12 16:18 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-12 17:39 -0800
Re: How to get an address for a string by direct user input without using PAD Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-13 01:41 +0100
Re: How to get an address for a string by direct user input without using PAD Hank Lenzi <henry.lenzi@gmail.com> - 2014-02-12 17:25 -0800
Re: How to get an address for a string by direct user input without using PAD Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-14 01:25 +0100
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 17:03 -0800
Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-14 02:41 +0000
Re: How to get an address for a string by direct user input without using PAD stephenXXX@mpeforth.com (Stephen Pelc) - 2014-02-13 12:40 +0000
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 17:41 -0800
Re: How to get an address for a string by direct user input without using PAD Mark Wills <markrobertwills@yahoo.co.uk> - 2014-02-10 02:32 -0800
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 17:23 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 15:49 -0800
Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-12 20:50 -0800
Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 16:38 -0800
Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-15 19:20 -0800
Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-15 19:23 -0800
csiph-web