Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #20301
| From | Gerry Jackson <gerry@jackson9000.fsnet.co.uk> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: MiniForth 0.1.18 has just been released ... |
| Date | 2013-03-05 17:22 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <kh59iq$leb$1@dont-email.me> (permalink) |
| References | <alpine.BSF.2.00.1302261641340.449@yoko.controlq.com> <5134f5b0$0$6329$e4fe514c@dreader35.news.xs4all.nl> <kh3158$mtp$1@dont-email.me> <ef44640b-3fd6-487a-99be-81fe4fda3b7e@ia3g2000vbb.googlegroups.com> <5135e271$0$26892$e4fe514c@dreader37.news.xs4all.nl> |
On 05/03/2013 12:17, Albert van der Horst wrote: > In article <kh3158$mtp$1@dont-email.me>, > Gerry Jackson <gerry@jackson9000.fsnet.co.uk> wrote: >> On 04/03/2013 19:27, Albert van der Horst wrote: >>> In article <kh2hvp$lnd$1@dont-email.me>, [...] >>>>> >>>>> My prefixes work the way you intend, using only the normal rules >>>>> of search order. >>>> >>>> Why do you mention that? I never mentioned prefixes or said you couldn't >>>> do that. I imagine that other Forth systems that handle prefixes do the >>>> same as you. >>> >>> Prefixes are the recognizers Anton talks about. Only with me they are >>> just Forth words, that are found in the dictionary. >>> Look up >>> 0x78AB >>> in the dictionary and find a match at 0x , because it has the prefix bit >>> set. Now 0x is IMMEDIATE and at execution find >IN pointing just past >>> 0x, ready to parse the number. >>> The whole mechanism adds two lines in INTERPRET. >>> >> >> How does ciforth handle the case where BASE is set to 36 and the >> programmer wants to input a base 36 number 0x78AB or 0x78ab or 0X78AB? > > The numbers with lower case are rejected as not a proper numbers. > 0X78AB is handled as follows: > In the ONLY wordlist there is a prefix 0 > : 0 > \ Backup to point at the digit 0, this way 1..9 can be aliases > -1 >IN +! > (NUMBER) \ DO the usual with decimal point etc. > POSTPONE SDLITERAL \ SLITERAL or DLITERAL > ; PREFIX IMMEDIATE > If 0X78AB is not found until encountering the word 0 in ONLY, > then this word 0 is executed. > > Had you created > " > : 0X BASE @ >R HEX (NUMBER) POSTPONE LITERAL R> BASE ! ; > PREFIX IMMEDIATE > " > it would take precedence, provided it is earlier in the search order > and the 0X78AB would be interpreted as a hex number. > If 0X is in a vocabulary that is not in the search order, 0X78AB > will be rejected as ERROR # 10 : NOT A WORD OR NUMBER > >> >> Can a ciforth user define a new prefix e.g. i# for a complex number, >> without delving into the guts of ciforth? > > That is exactly the point! > > Let's say we want to have a notation > i#123.E+4#-3.1456E0 > Assume atof parses things like 123.E+4 and -3.1456E0 > > NAMESPACE ZLIB \ A NAMESPACE is a wordlist with a name. > > ZLIB CONTEXT @ DEFINITIONS > : Bessel ... ; > : Complex_Bessel ... ; > : i# > NAME \ S: "123.E+4#-3.1456E0" > &# \ S: "123.E+4#-3.1456E0" 0x35 > $/ \ S: "-3.1456E0" "123.E+4" > atof atof \ S: - F: 123.E+4 -3.1456E0 > ... > ; PREFIX IMMEDIATE > CONTEXT ! PREVIOUS > > The complex number notation is understood if and only if > ZLIB is in the search order. > I see, ciforth is clearly non-standard in several respects then e.g. 0X78AB is a valid base 34, 35 or 36 integer in ANS Forth yet your explanation implies it would be recognised as a hex number. -- Gerry
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-02-26 17:03 -0500
Re: MiniForth 0.1.18 has just been released ... "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2013-02-27 04:06 -0500
Re: MiniForth 0.1.18 has just been released ... Richard Owlett <rowlett@pcnetinc.com> - 2013-02-27 05:30 -0600
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-02-27 06:34 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-02-27 14:42 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-02-27 11:54 -0600
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-02-27 15:27 -0500
Re: MiniForth 0.1.18 has just been released ... Coos Haak <chforth@hccnet.nl> - 2013-02-27 21:58 +0100
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-02-27 16:33 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-02 17:23 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-02 15:12 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-03 14:30 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-03 14:49 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-07 16:58 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-07 16:35 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-08 17:29 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-08 12:17 -0600
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-02-28 00:17 +0100
Re: MiniForth 0.1.18 has just been released ... Paul Rubin <no.email@nospam.invalid> - 2013-02-28 01:04 -0800
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-02-28 17:10 +0100
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-02-28 11:20 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-02 16:54 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-02 15:38 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-03 14:43 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-03 15:05 -0600
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-03 23:14 +0100
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-04 03:41 -0600
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-04 11:00 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-04 12:47 +0000
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-04 16:27 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-04 19:27 +0000
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-04 20:46 +0000
Re: MiniForth 0.1.18 has just been released ... Alex McDonald <blog@rivadpm.com> - 2013-03-05 00:19 -0800
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-05 12:17 +0000
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-05 17:22 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-05 17:52 +0000
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-05 17:03 +0000
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-03-05 12:38 -0500
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-05 17:57 +0000
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-03-05 13:29 -0500
Re: MiniForth 0.1.18 has just been released ... Andy Valencia <user@vsta.org> - 2013-03-05 22:19 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-05 17:58 +0000
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-05 19:26 +0000
Re: MiniForth 0.1.18 has just been released ... Alex McDonald <blog@rivadpm.com> - 2013-03-05 11:19 -0800
Forth convergence with rest of world Andy Valencia <user@vsta.org> - 2013-03-05 22:17 +0000
Re: Forth convergence with rest of world Alex McDonald <blog@rivadpm.com> - 2013-03-05 15:15 -0800
Re: Forth convergence with rest of world Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-06 17:35 +0100
Re: Forth convergence with rest of world albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-06 16:44 +0000
Re: Forth convergence with rest of world Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-06 17:39 +0000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-05 18:16 -0600
Re: Forth convergence with rest of world Rob Sciuk <rob@controlq.com> - 2013-03-06 13:49 -0500
Re: Forth convergence with rest of world Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-06 19:11 +0000
Re: Forth convergence with rest of world Rob Sciuk <rob@controlq.com> - 2013-03-06 14:24 -0500
Re: Forth convergence with rest of world Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-06 19:40 +0000
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-06 09:26 -1000
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-06 09:26 -1000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-06 15:34 -0600
Re: Forth convergence with rest of world Andy Valencia <user@vsta.org> - 2013-03-06 22:04 +0000
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-06 12:09 -1000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-07 04:24 -0600
Re: Forth convergence with rest of world Alex McDonald <blog@rivadpm.com> - 2013-03-07 04:15 -0800
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-07 08:42 -0600
Re: Forth convergence with rest of world Alex McDonald <blog@rivadpm.com> - 2013-03-07 13:50 -0800
Re: Forth convergence with rest of world Rob Sciuk <rob@controlq.com> - 2013-03-07 12:12 -0500
Re: Forth convergence with rest of world Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-07 18:36 +0000
Re: Forth convergence with rest of world Rob Sciuk <rob@controlq.com> - 2013-03-07 14:07 -0500
Re: Forth convergence with rest of world Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-07 19:43 +0000
Re: Forth convergence with rest of world anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-08 17:27 +0000
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-07 08:47 -1000
Re: Forth convergence with rest of world awegel@arcor.de (Alex Wegel) - 2013-03-07 21:42 +0100
Re: Forth convergence with rest of world Alex McDonald <blog@rivadpm.com> - 2013-03-07 14:43 -0800
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-07 13:53 -1000
Re: Forth convergence with rest of world stephenXXX@mpeforth.com (Stephen Pelc) - 2013-03-07 12:38 +0000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-07 08:43 -0600
Re: Forth convergence with rest of world Syd Rumpo <usenet@nononono.co.uk> - 2013-03-08 18:04 +0000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-08 12:18 -0600
Re: Forth convergence with rest of world Syd Rumpo <usenet@nononono.co.uk> - 2013-03-08 18:36 +0000
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-08 14:30 -1000
Re: Forth convergence with rest of world Syd Rumpo <usenet@nononono.co.uk> - 2013-03-09 01:27 +0000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-09 02:43 -0600
Re: MiniForth 0.1.18 has just been released ... Mark Wills <markrobertwills@yahoo.co.uk> - 2013-03-05 01:19 -0800
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-05 12:01 +0000
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-08 17:02 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-04 12:45 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-04 11:58 -0600
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-04 19:34 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-04 15:15 -0600
Re: MiniForth 0.1.18 has just been released ... Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2013-03-04 23:31 +0100
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-05 17:07 +0000
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-03-05 12:11 -0500
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-05 00:32 +0100
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-07 17:00 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-07 16:52 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-08 17:32 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-08 12:25 -0600
Re: MiniForth 0.1.18 has just been released ... Brad Eckert <hwfwguy@gmail.com> - 2013-03-11 09:57 -0700
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-11 12:05 -0500
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-11 17:20 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-11 14:05 -0500
Re: MiniForth 0.1.18 has just been released ... Alex McDonald <blog@rivadpm.com> - 2013-03-11 14:35 -0700
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-12 00:21 +0100
Re: MiniForth 0.1.18 has just been released ... stephenXXX@mpeforth.com (Stephen Pelc) - 2013-03-12 12:13 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-11 19:16 +0000
Re: MiniForth 0.1.18 has just been released ... Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-11 19:29 +0000
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-11 21:36 +0100
Re: MiniForth 0.1.18 has just been released ... Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-11 20:52 +0000
Re: MiniForth 0.1.18 has just been released ... Alex McDonald <blog@rivadpm.com> - 2013-03-11 14:39 -0700
Re: MiniForth 0.1.18 has just been released ... Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-11 21:52 +0000
Re: MiniForth 0.1.18 has just been released ... Coos Haak <chforth@hccnet.nl> - 2013-03-12 01:11 +0100
Re: MiniForth 0.1.18 has just been released ... Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-12 00:41 +0000
Re: MiniForth 0.1.18 has just been released ... Coos Haak <chforth@hccnet.nl> - 2013-03-12 17:33 +0100
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-02-27 11:51 -0500
Re: MiniForth 0.1.18 has just been released ... "Elizabeth D. Rather" <erather@forth.com> - 2013-02-27 09:25 -1000
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-02-27 17:23 -0500
Re: MiniForth 0.1.18 has just been released ... "Elizabeth D. Rather" <erather@forth.com> - 2013-02-27 13:10 -1000
csiph-web