Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

UNIX enhancements aren't.


devel / comp.lang.forth / SKIP/SCAN - what modern forth doesn't have it?

SubjectAuthor
* SKIP/SCAN - what modern forth doesn't have it?dxforth
+* Re: SKIP/SCAN - what modern forth doesn't have it?none
|`* Re: SKIP/SCAN - what modern forth doesn't have it?minf...@arcor.de
| `* Re: SKIP/SCAN - what modern forth doesn't have it?none
|  `- Re: SKIP/SCAN - what modern forth doesn't have it?minf...@arcor.de
+* Re: SKIP/SCAN - what modern forth doesn't have it?Heinrich Hohl
|+- Re: SKIP/SCAN - what modern forth doesn't have it?Zbig
|+- Re: SKIP/SCAN - what modern forth doesn't have it?none
|`* Re: SKIP/SCAN - what modern forth doesn't have it?dxforth
| `* Re: SKIP/SCAN - what modern forth doesn't have it?Heinrich Hohl
|  +- Re: SKIP/SCAN - what modern forth doesn't have it?minf...@arcor.de
|  +- Re: SKIP/SCAN - what modern forth doesn't have it?dxforth
|  +* Re: SKIP/SCAN - what modern forth doesn't have it?Stephen Pelc
|  |`* Re: SKIP/SCAN - what modern forth doesn't have it?Anton Ertl
|  | +* Re: SKIP/SCAN - what modern forth doesn't have it?Marcel Hendrix
|  | |`* Re: SKIP/SCAN - what modern forth doesn't have it?Hans Bezemer
|  | | `* Re: SKIP/SCAN - what modern forth doesn't have it?none
|  | |  `- Re: SKIP/SCAN - what modern forth doesn't have it?dxforth
|  | +- Re: SKIP/SCAN - what modern forth doesn't have it?none
|  | `* Re: SKIP/SCAN - what modern forth doesn't have it?dxforth
|  |  `* Re: SKIP/SCAN - what modern forth doesn't have it?NN
|  |   +- Re: SKIP/SCAN - what modern forth doesn't have it?NN
|  |   +* Re: SKIP/SCAN - what modern forth doesn't have it?minf...@arcor.de
|  |   |`- Re: SKIP/SCAN - what modern forth doesn't have it?dxforth
|  |   `- Re: SKIP/SCAN - what modern forth doesn't have it?dxforth
|  `- Re: SKIP/SCAN - what modern forth doesn't have it?dxforth
+* Re: SKIP/SCAN - what modern forth doesn't have it?Hans Bezemer
|`- Re: SKIP/SCAN - what modern forth doesn't have it?dxforth
`* Re: SKIP/SCAN - what modern forth doesn't have it?Rick C
 `* Re: SKIP/SCAN - what modern forth doesn't have it?minf...@arcor.de
  +- Re: SKIP/SCAN - what modern forth doesn't have it?none
  +* Re: SKIP/SCAN - what modern forth doesn't have it?Kerr-Mudd, John
  |`- Re: SKIP/SCAN - what modern forth doesn't have it?dxforth
  `- Re: SKIP/SCAN - what modern forth doesn't have it?dxforth

Pages:12
SKIP/SCAN - what modern forth doesn't have it?

<t9to17$1u6s$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18868&group=comp.lang.forth#18868

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: SKIP/SCAN - what modern forth doesn't have it?
Date: Mon, 4 Jul 2022 13:49:59 +1000
Organization: Aioe.org NNTP Server
Message-ID: <t9to17$1u6s$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="63708"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Mon, 4 Jul 2022 03:49 UTC

Until recently I treated SKIP/SCAN as exotic functions only found in
medium to large forths. That changed when I encountered them in small
microcontroller forths e.g. FlashForth, SwiftX.

If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
would say it's time to reconsider - not standardization as hell will
freeze first - rather treat them as ubiquitously and with as little
need of explanation or definition as is currently afforded PLACE.
Regarding compatibility, the only consideration is 'white space'.
SKIP/SCAN has the same restriction as WORD when BL is used as the
scan character. Which should come as no surprise as WORD is typically
implemented with SKIP/SCAN.

Re: SKIP/SCAN - what modern forth doesn't have it?

<nnd$41c54288$30190f6f@33ef14d0012fc3c0>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18875&group=comp.lang.forth#18875

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <t9to17$1u6s$1@gioia.aioe.org>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$41c54288$30190f6f@33ef14d0012fc3c0>
Organization: KPN B.V.
Date: Mon, 04 Jul 2022 09:43:36 +0200
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 30
Injection-Date: Mon, 04 Jul 2022 09:43:36 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2084
 by: none - Mon, 4 Jul 2022 07:43 UTC

In article <t9to17$1u6s$1@gioia.aioe.org>, dxforth <dxforth@gmail.com> wrote:
>Until recently I treated SKIP/SCAN as exotic functions only found in
>medium to large forths. That changed when I encountered them in small
>microcontroller forths e.g. FlashForth, SwiftX.
>
>If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
>would say it's time to reconsider - not standardization as hell will
>freeze first - rather treat them as ubiquitously and with as little
>need of explanation or definition as is currently afforded PLACE.
>Regarding compatibility, the only consideration is 'white space'.
>SKIP/SCAN has the same restriction as WORD when BL is used as the
>scan character. Which should come as no surprise as WORD is typically
>implemented with SKIP/SCAN.

In modern Forth WORD is not typically implemented but a loadable extension.

For SKIP SCAN I can't remember what it is supposed to do.
Gforth 0.7.3 has it, but I can't find in the documentation.
Swiftforth has it, but I can't find in the documentation.

Bottom line, as soon as it standardized, I will look into it,
if it worthwhile to add to ciforth.

Groetjes Albert
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Re: SKIP/SCAN - what modern forth doesn't have it?

<3051af2f-1cec-4aca-885c-76a54938e1f0n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18876&group=comp.lang.forth#18876

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:1467:b0:6af:3f68:6be7 with SMTP id j7-20020a05620a146700b006af3f686be7mr18819125qkl.717.1656921166776;
Mon, 04 Jul 2022 00:52:46 -0700 (PDT)
X-Received: by 2002:a0c:e352:0:b0:472:fc89:1ec7 with SMTP id
a18-20020a0ce352000000b00472fc891ec7mr877836qvm.117.1656921166622; Mon, 04
Jul 2022 00:52:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 4 Jul 2022 00:52:46 -0700 (PDT)
In-Reply-To: <nnd$41c54288$30190f6f@33ef14d0012fc3c0>
Injection-Info: google-groups.googlegroups.com; posting-host=87.157.102.236; posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 87.157.102.236
References: <t9to17$1u6s$1@gioia.aioe.org> <nnd$41c54288$30190f6f@33ef14d0012fc3c0>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3051af2f-1cec-4aca-885c-76a54938e1f0n@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Mon, 04 Jul 2022 07:52:46 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 27
 by: minf...@arcor.de - Mon, 4 Jul 2022 07:52 UTC

none albert schrieb am Montag, 4. Juli 2022 um 09:43:40 UTC+2:
> In article <t9to17$1u6s$1...@gioia.aioe.org>, dxforth <dxf...@gmail.com> wrote:
> >Until recently I treated SKIP/SCAN as exotic functions only found in
> >medium to large forths. That changed when I encountered them in small
> >microcontroller forths e.g. FlashForth, SwiftX.
> >
> >If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
> >would say it's time to reconsider - not standardization as hell will
> >freeze first - rather treat them as ubiquitously and with as little
> >need of explanation or definition as is currently afforded PLACE.
> >Regarding compatibility, the only consideration is 'white space'.
> >SKIP/SCAN has the same restriction as WORD when BL is used as the
> >scan character. Which should come as no surprise as WORD is typically
> >implemented with SKIP/SCAN.
> In modern Forth WORD is not typically implemented but a loadable extension.
>
> For SKIP SCAN I can't remember what it is supposed to do.
> Gforth 0.7.3 has it, but I can't find in the documentation.
> Swiftforth has it, but I can't find in the documentation.
>
> Bottom line, as soon as it standardized, I will look into it,
> if it worthwhile to add to ciforth.

I consider Forth source text as pre-tokenized because every word/number
appears space-delimited.

For non-tokenized text those classic SKIP/SCAN words are practically useless.

Re: SKIP/SCAN - what modern forth doesn't have it?

<nnd$3b85fb59$30733fa2@33ef14d0012fc3c0>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18877&group=comp.lang.forth#18877

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <t9to17$1u6s$1@gioia.aioe.org> <nnd$41c54288$30190f6f@33ef14d0012fc3c0> <3051af2f-1cec-4aca-885c-76a54938e1f0n@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$3b85fb59$30733fa2@33ef14d0012fc3c0>
Organization: KPN B.V.
Date: Mon, 04 Jul 2022 09:59:16 +0200
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 45
Injection-Date: Mon, 04 Jul 2022 09:59:16 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2806
 by: none - Mon, 4 Jul 2022 07:59 UTC

In article <3051af2f-1cec-4aca-885c-76a54938e1f0n@googlegroups.com>,
minf...@arcor.de <minforth@arcor.de> wrote:
>none albert schrieb am Montag, 4. Juli 2022 um 09:43:40 UTC+2:
>> In article <t9to17$1u6s$1...@gioia.aioe.org>, dxforth
><dxf...@gmail.com> wrote:
>> >Until recently I treated SKIP/SCAN as exotic functions only found in
>> >medium to large forths. That changed when I encountered them in small
>> >microcontroller forths e.g. FlashForth, SwiftX.
>> >
>> >If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
>> >would say it's time to reconsider - not standardization as hell will
>> >freeze first - rather treat them as ubiquitously and with as little
>> >need of explanation or definition as is currently afforded PLACE.
>> >Regarding compatibility, the only consideration is 'white space'.
>> >SKIP/SCAN has the same restriction as WORD when BL is used as the
>> >scan character. Which should come as no surprise as WORD is typically
>> >implemented with SKIP/SCAN.
>> In modern Forth WORD is not typically implemented but a loadable extension.
>>
>> For SKIP SCAN I can't remember what it is supposed to do.
>> Gforth 0.7.3 has it, but I can't find in the documentation.
>> Swiftforth has it, but I can't find in the documentation.
>>
>> Bottom line, as soon as it standardized, I will look into it,
>> if it worthwhile to add to ciforth.
>
>I consider Forth source text as pre-tokenized because every word/number
>appears space-delimited.
>
>For non-tokenized text those classic SKIP/SCAN words are practically useless.
>

No any more. The modern insights is that
"we gaan naar Rome"
is a token.
You can't have much success if considering Forth as pre-tokenized,
nowadays. That was cure in the seventies.

Groetjes Albert.
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Re: SKIP/SCAN - what modern forth doesn't have it?

<85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18879&group=comp.lang.forth#18879

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:87c5:0:b0:6af:37b0:5c3 with SMTP id j188-20020a3787c5000000b006af37b005c3mr19352806qkd.109.1656928706342;
Mon, 04 Jul 2022 02:58:26 -0700 (PDT)
X-Received: by 2002:a05:622a:1195:b0:31a:af14:ae00 with SMTP id
m21-20020a05622a119500b0031aaf14ae00mr23881772qtk.305.1656928706143; Mon, 04
Jul 2022 02:58:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 4 Jul 2022 02:58:25 -0700 (PDT)
In-Reply-To: <t9to17$1u6s$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:ed:a72f:fc01:60f6:eabf:87ff:102a;
posting-account=mrP5kgoAAADXISqI3e5f4EXLUinHClBq
NNTP-Posting-Host: 2003:ed:a72f:fc01:60f6:eabf:87ff:102a
References: <t9to17$1u6s$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
From: hheinric...@gmail.com (Heinrich Hohl)
Injection-Date: Mon, 04 Jul 2022 09:58:26 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 12
 by: Heinrich Hohl - Mon, 4 Jul 2022 09:58 UTC

On Monday, July 4, 2022 at 5:50:02 AM UTC+2, dxforth wrote:
> Until recently I treated SKIP/SCAN as exotic functions only found in
> medium to large forths.

I use SKIP and SCAN quite often when processing strings.

I would not know how to skip leading characters, or scan for words
delimited by a specified character, without SKIP and SCAN.

It came as a surprise to me that these useful words have not been
included into the ANS standard. They should be added.

Henry

Re: SKIP/SCAN - what modern forth doesn't have it?

<68864f10-b723-4a4e-8d92-e19bac0555aan@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18880&group=comp.lang.forth#18880

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:40d:b0:31d:4be9:33a7 with SMTP id n13-20020a05622a040d00b0031d4be933a7mr4165515qtx.655.1656929511350;
Mon, 04 Jul 2022 03:11:51 -0700 (PDT)
X-Received: by 2002:a05:620a:29d3:b0:6b2:560d:25c3 with SMTP id
s19-20020a05620a29d300b006b2560d25c3mr10876370qkp.663.1656929511080; Mon, 04
Jul 2022 03:11:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 4 Jul 2022 03:11:50 -0700 (PDT)
In-Reply-To: <85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a;
posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a
References: <t9to17$1u6s$1@gioia.aioe.org> <85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <68864f10-b723-4a4e-8d92-e19bac0555aan@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
From: zbigniew...@gmail.com (Zbig)
Injection-Date: Mon, 04 Jul 2022 10:11:51 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 5
 by: Zbig - Mon, 4 Jul 2022 10:11 UTC

> It came as a surprise to me that these useful words have not been
> included into the ANS standard. They should be added.

I believe these two words -- and any other -- everyone can include
on one's own, without trying to make the whole Forth-world happy
with new, even better standard.

Re: SKIP/SCAN - what modern forth doesn't have it?

<360c8997-4fc7-480a-99c5-e4656ddd5126n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18881&group=comp.lang.forth#18881

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:19c6:b0:470:4e64:9962 with SMTP id j6-20020a05621419c600b004704e649962mr26828014qvc.82.1656931325199;
Mon, 04 Jul 2022 03:42:05 -0700 (PDT)
X-Received: by 2002:a05:622a:2c7:b0:31d:3cc2:3439 with SMTP id
a7-20020a05622a02c700b0031d3cc23439mr11229296qtx.185.1656931325052; Mon, 04
Jul 2022 03:42:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 4 Jul 2022 03:42:04 -0700 (PDT)
In-Reply-To: <nnd$3b85fb59$30733fa2@33ef14d0012fc3c0>
Injection-Info: google-groups.googlegroups.com; posting-host=87.157.102.236; posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 87.157.102.236
References: <t9to17$1u6s$1@gioia.aioe.org> <nnd$41c54288$30190f6f@33ef14d0012fc3c0>
<3051af2f-1cec-4aca-885c-76a54938e1f0n@googlegroups.com> <nnd$3b85fb59$30733fa2@33ef14d0012fc3c0>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <360c8997-4fc7-480a-99c5-e4656ddd5126n@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Mon, 04 Jul 2022 10:42:05 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 42
 by: minf...@arcor.de - Mon, 4 Jul 2022 10:42 UTC

none albert schrieb am Montag, 4. Juli 2022 um 09:59:19 UTC+2:
> In article <3051af2f-1cec-4aca...@googlegroups.com>,
> minf...@arcor.de <minf...@arcor.de> wrote:
> >none albert schrieb am Montag, 4. Juli 2022 um 09:43:40 UTC+2:
> >> In article <t9to17$1u6s$1...@gioia.aioe.org>, dxforth
> ><dxf...@gmail.com> wrote:
> >> >Until recently I treated SKIP/SCAN as exotic functions only found in
> >> >medium to large forths. That changed when I encountered them in small
> >> >microcontroller forths e.g. FlashForth, SwiftX.
> >> >
> >> >If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
> >> >would say it's time to reconsider - not standardization as hell will
> >> >freeze first - rather treat them as ubiquitously and with as little
> >> >need of explanation or definition as is currently afforded PLACE.
> >> >Regarding compatibility, the only consideration is 'white space'.
> >> >SKIP/SCAN has the same restriction as WORD when BL is used as the
> >> >scan character. Which should come as no surprise as WORD is typically
> >> >implemented with SKIP/SCAN.
> >> In modern Forth WORD is not typically implemented but a loadable extension.
> >>
> >> For SKIP SCAN I can't remember what it is supposed to do.
> >> Gforth 0.7.3 has it, but I can't find in the documentation.
> >> Swiftforth has it, but I can't find in the documentation.
> >>
> >> Bottom line, as soon as it standardized, I will look into it,
> >> if it worthwhile to add to ciforth.
> >
> >I consider Forth source text as pre-tokenized because every word/number
> >appears space-delimited.
> >
> >For non-tokenized text those classic SKIP/SCAN words are practically useless.
> >
> No any more. The modern insights is that
> "we gaan naar Rome"
> is a token.
> You can't have much success if considering Forth as pre-tokenized,
> nowadays. That was cure in the seventies.

That's a question of definition. Scanning and parsing is fuzzy anyhow in Forth.

I had my revelations when treating non-Forth code with Forth eg
4*alpha+0.01
with alpha being a known constant.

Re: SKIP/SCAN - what modern forth doesn't have it?

<nnd$4d072372$10f98ad2@2c1c37806eda686d>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18885&group=comp.lang.forth#18885

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
References: <t9to17$1u6s$1@gioia.aioe.org> <85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$4d072372$10f98ad2@2c1c37806eda686d>
Organization: KPN B.V.
Date: Mon, 04 Jul 2022 14:18:28 +0200
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.pop-hannover.net!news-feed.cs.net.de!193.141.40.65.MISMATCH!npeer.as286.net!npeer-ng0.as286.net!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 28
Injection-Date: Mon, 04 Jul 2022 14:18:28 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1765
 by: none - Mon, 4 Jul 2022 12:18 UTC

In article <85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>,
Heinrich Hohl <hheinrich.hohl@gmail.com> wrote:
>On Monday, July 4, 2022 at 5:50:02 AM UTC+2, dxforth wrote:
>> Until recently I treated SKIP/SCAN as exotic functions only found in
>> medium to large forths.
>
>I use SKIP and SCAN quite often when processing strings.
>
>I would not know how to skip leading characters, or scan for words
>delimited by a specified character, without SKIP and SCAN.
>
>It came as a surprise to me that these useful words have not been
>included into the ANS standard. They should be added.

Then propose and give a watertight definition, and get it approved.
As everybody agrees with the definition, that is the motivation
to add to every Forth.

>
>Henry

Groetjes Albert
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Re: SKIP/SCAN - what modern forth doesn't have it?

<0e0fe65a-7e76-47a5-a03e-0405eb0bd693n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18888&group=comp.lang.forth#18888

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:de0c:0:b0:69e:cd37:7646 with SMTP id h12-20020a37de0c000000b0069ecd377646mr19459500qkj.449.1656941432440;
Mon, 04 Jul 2022 06:30:32 -0700 (PDT)
X-Received: by 2002:ac8:5c08:0:b0:317:e856:bcff with SMTP id
i8-20020ac85c08000000b00317e856bcffmr24116423qti.615.1656941432225; Mon, 04
Jul 2022 06:30:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 4 Jul 2022 06:30:31 -0700 (PDT)
In-Reply-To: <t9to17$1u6s$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=77.174.47.232; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 77.174.47.232
References: <t9to17$1u6s$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0e0fe65a-7e76-47a5-a03e-0405eb0bd693n@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Mon, 04 Jul 2022 13:30:32 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 22
 by: Hans Bezemer - Mon, 4 Jul 2022 13:30 UTC

On Monday, July 4, 2022 at 5:50:02 AM UTC+2, dxforth wrote:
> If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
> would say it's time to reconsider - not standardization as hell will
> freeze first - rather treat them as ubiquitously and with as little
> need of explanation or definition as is currently afforded PLACE.
I rarely use SCAN/SKIP, because I read most strings from file - and
there (in 4tH) I can use PARSE, PARSE-NAME - or numerous other
(loadable) variations - including PARSE-CSV.

Where SCAN/SKIP is concerned I have some other variations on that
theme where the SCAN, SKIP or SPLIT function is a DEFERed word
that can e.g. do numeric characters or non-alphabetic characters -
you name it.

> Regarding compatibility, the only consideration is 'white space'.
> SKIP/SCAN has the same restriction as WORD when BL is used as the
> scan character. Which should come as no surprise as WORD is typically
> implemented with SKIP/SCAN.
WORD is loadable in 4tH - but I don't think I've used it in decades.

In short - yeah, I got 'em. No, I barely use 'em.

Hans Bezemer

Re: SKIP/SCAN - what modern forth doesn't have it?

<321edd99-a06d-4716-93f3-b3655dfcc8f5n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18889&group=comp.lang.forth#18889

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:3003:b0:462:1c15:772c with SMTP id ke3-20020a056214300300b004621c15772cmr28207144qvb.71.1656949876340;
Mon, 04 Jul 2022 08:51:16 -0700 (PDT)
X-Received: by 2002:a37:6394:0:b0:6ae:d8fc:a582 with SMTP id
x142-20020a376394000000b006aed8fca582mr20692481qkb.75.1656949875995; Mon, 04
Jul 2022 08:51:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 4 Jul 2022 08:51:15 -0700 (PDT)
In-Reply-To: <t9to17$1u6s$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=63.114.57.174; posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 63.114.57.174
References: <t9to17$1u6s$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <321edd99-a06d-4716-93f3-b3655dfcc8f5n@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
From: gnuarm.d...@gmail.com (Rick C)
Injection-Date: Mon, 04 Jul 2022 15:51:16 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 21
 by: Rick C - Mon, 4 Jul 2022 15:51 UTC

On Sunday, July 3, 2022 at 11:50:02 PM UTC-4, dxforth wrote:
> Until recently I treated SKIP/SCAN as exotic functions only found in
> medium to large forths. That changed when I encountered them in small
> microcontroller forths e.g. FlashForth, SwiftX.
>
> If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
> would say it's time to reconsider - not standardization as hell will
> freeze first - rather treat them as ubiquitously and with as little
> need of explanation or definition as is currently afforded PLACE.
> Regarding compatibility, the only consideration is 'white space'.
> SKIP/SCAN has the same restriction as WORD when BL is used as the
> scan character. Which should come as no surprise as WORD is typically
> implemented with SKIP/SCAN.

At least one post says they don't know what SKIP and SCAN are supposed to do. I don't see where anyone mentions this. Can someone explain it for my benefit?

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209

Re: SKIP/SCAN - what modern forth doesn't have it?

<f2d6e47e-d462-4dc0-a317-d9cfb7089902n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18891&group=comp.lang.forth#18891

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:2992:b0:6ae:e8ff:b086 with SMTP id r18-20020a05620a299200b006aee8ffb086mr20599543qkp.494.1656951555833;
Mon, 04 Jul 2022 09:19:15 -0700 (PDT)
X-Received: by 2002:a05:620a:190f:b0:6af:2746:cab8 with SMTP id
bj15-20020a05620a190f00b006af2746cab8mr19879879qkb.404.1656951555533; Mon, 04
Jul 2022 09:19:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 4 Jul 2022 09:19:15 -0700 (PDT)
In-Reply-To: <321edd99-a06d-4716-93f3-b3655dfcc8f5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=87.157.102.236; posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 87.157.102.236
References: <t9to17$1u6s$1@gioia.aioe.org> <321edd99-a06d-4716-93f3-b3655dfcc8f5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f2d6e47e-d462-4dc0-a317-d9cfb7089902n@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Mon, 04 Jul 2022 16:19:15 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 18
 by: minf...@arcor.de - Mon, 4 Jul 2022 16:19 UTC

gnuarm.del...@gmail.com schrieb am Montag, 4. Juli 2022 um 17:51:17 UTC+2:
> On Sunday, July 3, 2022 at 11:50:02 PM UTC-4, dxforth wrote:
> > Until recently I treated SKIP/SCAN as exotic functions only found in
> > medium to large forths. That changed when I encountered them in small
> > microcontroller forths e.g. FlashForth, SwiftX.
> >
> > If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
> > would say it's time to reconsider - not standardization as hell will
> > freeze first - rather treat them as ubiquitously and with as little
> > need of explanation or definition as is currently afforded PLACE.
> > Regarding compatibility, the only consideration is 'white space'.
> > SKIP/SCAN has the same restriction as WORD when BL is used as the
> > scan character. Which should come as no surprise as WORD is typically
> > implemented with SKIP/SCAN.
> At least one post says they don't know what SKIP and SCAN are supposed to do. I don't see where anyone mentions this. Can someone explain it for my benefit?
>

See here page 101ff (89/90 in the document)
http://www.forth.org/OffeteStore/1003_InsideF83.pdf

Re: SKIP/SCAN - what modern forth doesn't have it?

<nnd$2bcf63d3$6b85d659@a7b487c08bacf697>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18897&group=comp.lang.forth#18897

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <t9to17$1u6s$1@gioia.aioe.org> <321edd99-a06d-4716-93f3-b3655dfcc8f5n@googlegroups.com> <f2d6e47e-d462-4dc0-a317-d9cfb7089902n@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$2bcf63d3$6b85d659@a7b487c08bacf697>
Organization: KPN B.V.
Date: Mon, 04 Jul 2022 21:30:44 +0200
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 36
Injection-Date: Mon, 04 Jul 2022 21:30:44 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2512
 by: none - Mon, 4 Jul 2022 19:30 UTC

In article <f2d6e47e-d462-4dc0-a317-d9cfb7089902n@googlegroups.com>,
minf...@arcor.de <minforth@arcor.de> wrote:
>gnuarm.del...@gmail.com schrieb am Montag, 4. Juli 2022 um 17:51:17 UTC+2:
>> On Sunday, July 3, 2022 at 11:50:02 PM UTC-4, dxforth wrote:
>> > Until recently I treated SKIP/SCAN as exotic functions only found in
>> > medium to large forths. That changed when I encountered them in small
>> > microcontroller forths e.g. FlashForth, SwiftX.
>> >
>> > If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
>> > would say it's time to reconsider - not standardization as hell will
>> > freeze first - rather treat them as ubiquitously and with as little
>> > need of explanation or definition as is currently afforded PLACE.
>> > Regarding compatibility, the only consideration is 'white space'.
>> > SKIP/SCAN has the same restriction as WORD when BL is used as the
>> > scan character. Which should come as no surprise as WORD is typically
>> > implemented with SKIP/SCAN.
>> At least one post says they don't know what SKIP and SCAN are supposed
>to do. I don't see where anyone mentions this. Can someone explain it
>for my benefit?
>>
>
>See here page 101ff (89/90 in the document)
>http://www.forth.org/OffeteStore/1003_InsideF83.pdf

Please note that this refers to a single implementation of
Forth. (f83.exe).
These words are not present in the FORTH 83 standard.
http://forth.sourceforge.net/standard/fst83/

Groetjes Albert
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Re: SKIP/SCAN - what modern forth doesn't have it?

<20220704211611.410de70576c6ac03f44e9dfb@127.0.0.1>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18899&group=comp.lang.forth#18899

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: adm...@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: comp.lang.forth
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
Date: Mon, 4 Jul 2022 21:16:11 +0100
Organization: Dis
Lines: 52
Message-ID: <20220704211611.410de70576c6ac03f44e9dfb@127.0.0.1>
References: <t9to17$1u6s$1@gioia.aioe.org>
<321edd99-a06d-4716-93f3-b3655dfcc8f5n@googlegroups.com>
<f2d6e47e-d462-4dc0-a317-d9cfb7089902n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="1acd14894ef3cfb41e483677d0417b5d";
logging-data="3646667"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0f4Q8GQ25SD7/E2HlGnkBC66X+NVwp7c="
Cancel-Lock: sha1:6b5ge1ORlbOuitGwmqQcfxYEQKs=
GNU: Terry Pratchett
;X-no-Archive: Maybe
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Kerr-Mudd, John - Mon, 4 Jul 2022 20:16 UTC

On Mon, 4 Jul 2022 09:19:15 -0700 (PDT)
"minf...@arcor.de" <minforth@arcor.de> wrote:

> gnuarm.del...@gmail.com schrieb am Montag, 4. Juli 2022 um 17:51:17 UTC+2:
> > On Sunday, July 3, 2022 at 11:50:02 PM UTC-4, dxforth wrote:
> > > Until recently I treated SKIP/SCAN as exotic functions only found in
> > > medium to large forths. That changed when I encountered them in small
> > > microcontroller forths e.g. FlashForth, SwiftX.
> > >
> > > If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
> > > would say it's time to reconsider - not standardization as hell will
> > > freeze first - rather treat them as ubiquitously and with as little
> > > need of explanation or definition as is currently afforded PLACE.
> > > Regarding compatibility, the only consideration is 'white space'.
> > > SKIP/SCAN has the same restriction as WORD when BL is used as the
> > > scan character. Which should come as no surprise as WORD is typically
> > > implemented with SKIP/SCAN.
> > At least one post says they don't know what SKIP and SCAN are supposed to do. I don't see where anyone mentions this. Can someone explain it for my benefit?
> >
>
> See here page 101ff (89/90 in the document)
> http://www.forth.org/OffeteStore/1003_InsideF83.pdf

There's a typo in the asm code for SKIP on that page:
<quote>
LABEL DONE A common returning point when the input stream is exhausted.
CX PUSH Push the contents of CX on stack and return. CX register has the remaining length
of the stream.
NEXT

CODE SKIP ( addr len char -- addr1 len1 )
Given the address and length of a string, and a character to look for, scan through
the string while we continue to find the character. Leave the address of the
mismatch and the length of the remaining string.
AX POP Move char to AX register.
CX POP Move len to CX register.
DONE JCXZ If length of string is zero, jump to DONE and return.
DI POP Move addr to DI register.
DX DX MOV
DX ES MOV Set ES=DS for string manipulations.
REPZ BYTE SCAS Repeatedly scan the string until we find a character different from that in AX.
0<> IF CX now has the count of characters in the remaining string. If CX is not zero,
</quote>

I'm pretty sure it should be:
DX DS MOV
before
DX ES MOV Set ES=DS for string manipulations.
--
Bah, and indeed Humbug.

Re: SKIP/SCAN - what modern forth doesn't have it?

<ta0as4$ge1$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18904&group=comp.lang.forth#18904

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
Date: Tue, 5 Jul 2022 13:23:47 +1000
Organization: Aioe.org NNTP Server
Message-ID: <ta0as4$ge1$1@gioia.aioe.org>
References: <t9to17$1u6s$1@gioia.aioe.org>
<85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="16833"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Tue, 5 Jul 2022 03:23 UTC

On 4/07/2022 19:58, Heinrich Hohl wrote:
> On Monday, July 4, 2022 at 5:50:02 AM UTC+2, dxforth wrote:
>> Until recently I treated SKIP/SCAN as exotic functions only found in
>> medium to large forths.
>
> I use SKIP and SCAN quite often when processing strings.
>
> I would not know how to skip leading characters, or scan for words
> delimited by a specified character, without SKIP and SCAN.
>
> It came as a surprise to me that these useful words have not been
> included into the ANS standard. They should be added.

Checking occurrence of SCAN (approx, excluding false matches but not
duplicated sources):

SwiftForth: 35
VfxForth: 168
Win32Forth: 269 (???)
Gforth: 34

SCAN is used in literally every application I write (command-tail parsing).

For those who use SKIP and SCAN, does it specially handle TABs?
e.g. VFX versions treat TABs in the string as if they were BL.
Has it caused any issues in practice?

Re: SKIP/SCAN - what modern forth doesn't have it?

<ta0bko$m1r$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18905&group=comp.lang.forth#18905

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
Date: Tue, 5 Jul 2022 13:36:55 +1000
Organization: Aioe.org NNTP Server
Message-ID: <ta0bko$m1r$1@gioia.aioe.org>
References: <t9to17$1u6s$1@gioia.aioe.org>
<321edd99-a06d-4716-93f3-b3655dfcc8f5n@googlegroups.com>
<f2d6e47e-d462-4dc0-a317-d9cfb7089902n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="22587"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Tue, 5 Jul 2022 03:36 UTC

On 5/07/2022 02:19, minf...@arcor.de wrote:
> gnuarm.del...@gmail.com schrieb am Montag, 4. Juli 2022 um 17:51:17 UTC+2:
>> On Sunday, July 3, 2022 at 11:50:02 PM UTC-4, dxforth wrote:
>> > Until recently I treated SKIP/SCAN as exotic functions only found in
>> > medium to large forths. That changed when I encountered them in small
>> > microcontroller forths e.g. FlashForth, SwiftX.
>> >
>> > If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
>> > would say it's time to reconsider - not standardization as hell will
>> > freeze first - rather treat them as ubiquitously and with as little
>> > need of explanation or definition as is currently afforded PLACE.
>> > Regarding compatibility, the only consideration is 'white space'.
>> > SKIP/SCAN has the same restriction as WORD when BL is used as the
>> > scan character. Which should come as no surprise as WORD is typically
>> > implemented with SKIP/SCAN.
>> At least one post says they don't know what SKIP and SCAN are supposed to do.

ANS said there were folks oblivious about locals - so they introduced it!
Their way of getting something into the 'forth common consciousness'.

Re: SKIP/SCAN - what modern forth doesn't have it?

<ta0dfk$144d$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18906&group=comp.lang.forth#18906

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
Date: Tue, 5 Jul 2022 14:08:20 +1000
Organization: Aioe.org NNTP Server
Message-ID: <ta0dfk$144d$1@gioia.aioe.org>
References: <t9to17$1u6s$1@gioia.aioe.org>
<321edd99-a06d-4716-93f3-b3655dfcc8f5n@googlegroups.com>
<f2d6e47e-d462-4dc0-a317-d9cfb7089902n@googlegroups.com>
<20220704211611.410de70576c6ac03f44e9dfb@127.0.0.1>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="37005"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Tue, 5 Jul 2022 04:08 UTC

On 5/07/2022 06:16, Kerr-Mudd, John wrote:
>>
>> See here page 101ff (89/90 in the document)
>> http://www.forth.org/OffeteStore/1003_InsideF83.pdf
>
> There's a typo in the asm code for SKIP on that page:
> <quote>
> LABEL DONE A common returning point when the input stream is exhausted.
> CX PUSH Push the contents of CX on stack and return. CX register has the remaining length
> of the stream.
> NEXT
>
> CODE SKIP ( addr len char -- addr1 len1 )
> Given the address and length of a string, and a character to look for, scan through
> the string while we continue to find the character. Leave the address of the
> mismatch and the length of the remaining string.
> AX POP Move char to AX register.
> CX POP Move len to CX register.
> DONE JCXZ If length of string is zero, jump to DONE and return.
> DI POP Move addr to DI register.
> DX DX MOV
> DX ES MOV Set ES=DS for string manipulations.
> REPZ BYTE SCAS Repeatedly scan the string until we find a character different from that in AX.
> 0<> IF CX now has the count of characters in the remaining string. If CX is not zero,
> </quote>
>
>
> I'm pretty sure it should be:
> DX DS MOV
> before
> DX ES MOV Set ES=DS for string manipulations.

A nice trick is to allow ES to be set from a variable. This allows SKIP
and other string operators to be used on segments other than forth e.g.

\ Return DOS environment segment
: ENVSEG ( -- seg ) $2C @ ;

\ Search DOS environment for string a u. Return null
\ terminated remainder. Null not included in count.
: GETENV ( a u -- seg zadr len true | false )
2>r envseg dup sseg !
0 begin 2dup @l while 1+ repeat 2+
r@ 0 rot 2r> caps search
if rot /string drop zcount true
else 2drop 2drop 0 then cseg sseg ! ;

Re: SKIP/SCAN - what modern forth doesn't have it?

<ta0ggn$1rua$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18907&group=comp.lang.forth#18907

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!rocksolid2!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
Date: Tue, 5 Jul 2022 15:00:07 +1000
Organization: Aioe.org NNTP Server
Message-ID: <ta0ggn$1rua$1@gioia.aioe.org>
References: <t9to17$1u6s$1@gioia.aioe.org>
<0e0fe65a-7e76-47a5-a03e-0405eb0bd693n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="61386"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Tue, 5 Jul 2022 05:00 UTC

On 4/07/2022 23:30, Hans Bezemer wrote:
> On Monday, July 4, 2022 at 5:50:02 AM UTC+2, dxforth wrote:
>> If forthers are avoiding SKIP/SCAN because it's 'not ANS' then I
>> would say it's time to reconsider - not standardization as hell will
>> freeze first - rather treat them as ubiquitously and with as little
>> need of explanation or definition as is currently afforded PLACE.
> I rarely use SCAN/SKIP, because I read most strings from file - and
> there (in 4tH) I can use PARSE, PARSE-NAME - or numerous other
> (loadable) variations - including PARSE-CSV.
>
> Where SCAN/SKIP is concerned I have some other variations on that
> theme where the SCAN, SKIP or SPLIT function is a DEFERed word
> that can e.g. do numeric characters or non-alphabetic characters -
> you name it.

Staying on that thought, Wil Baden did a 'generalized' SKIP/SCAN -
macros in a BEGIN WHILE REPEAT. It could scan backwards, forwards,
skip white-space etc. I've wondered who came up with the original
SKIP/SCAN factors - Laxen & Perry - or perhaps another Baden suggestion
like PLACE ?

Re: SKIP/SCAN - what modern forth doesn't have it?

<705982c5-5dfb-4459-82e2-3b4e17744b84n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18908&group=comp.lang.forth#18908

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:29ca:b0:472:fa99:100 with SMTP id gh10-20020a05621429ca00b00472fa990100mr5612608qvb.87.1657013026191;
Tue, 05 Jul 2022 02:23:46 -0700 (PDT)
X-Received: by 2002:a05:622a:551:b0:31d:425c:fb8e with SMTP id
m17-20020a05622a055100b0031d425cfb8emr11415554qtx.478.1657013025891; Tue, 05
Jul 2022 02:23:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 5 Jul 2022 02:23:45 -0700 (PDT)
In-Reply-To: <ta0as4$ge1$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:ed:a72f:fc01:cc15:6a50:18f3:246c;
posting-account=mrP5kgoAAADXISqI3e5f4EXLUinHClBq
NNTP-Posting-Host: 2003:ed:a72f:fc01:cc15:6a50:18f3:246c
References: <t9to17$1u6s$1@gioia.aioe.org> <85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>
<ta0as4$ge1$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <705982c5-5dfb-4459-82e2-3b4e17744b84n@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
From: hheinric...@gmail.com (Heinrich Hohl)
Injection-Date: Tue, 05 Jul 2022 09:23:46 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2567
 by: Heinrich Hohl - Tue, 5 Jul 2022 09:23 UTC

On Tuesday, July 5, 2022 at 5:23:51 AM UTC+2, dxforth wrote:
> For those who use SKIP and SCAN, does it specially handle TABs?
> e.g. VFX versions treat TABs in the string as if they were BL.
> Has it caused any issues in practice?

SKIP and SCAN are only supposed to skip or scan for the specified character.
Space ($20) and tab ($09) are clearly not the same characters, and the two
words should be able to distinguish them. You may want to distinguish them!

In SwiftForth, SKIP and SCAN work as expected. They will distinguish space and tab.
Both words are code definitions and written as short as possible with no extra actions.
This is how it should be.

I looked at VFX and yes, this is weird. The definitions for SKIP and SCAN are more
complicated than necessary and contain extra tests for $09 and $20.

In my eyes this is not a good solution. Treating space and tab as identical characters
may be convenient at times, but this requirement should be handled differently.

In Forth, basic words should perform simple actions. This makes their actions predictable
and avoids unexpected side effects.

The only good thing that I can say about it is that the VFX manual clearly describes the
unusual behavior of SKIP and SCAN:
"Note that when a space char is given, tabs are also ignored."

Henry

Re: SKIP/SCAN - what modern forth doesn't have it?

<44063aa9-05eb-42ee-8260-dc45215fcf7fn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18909&group=comp.lang.forth#18909

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:1897:b0:31d:3f9e:d6de with SMTP id v23-20020a05622a189700b0031d3f9ed6demr12494307qtc.396.1657013871902;
Tue, 05 Jul 2022 02:37:51 -0700 (PDT)
X-Received: by 2002:a05:622a:1ba5:b0:317:c65b:3ad1 with SMTP id
bp37-20020a05622a1ba500b00317c65b3ad1mr27166062qtb.117.1657013871753; Tue, 05
Jul 2022 02:37:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 5 Jul 2022 02:37:51 -0700 (PDT)
In-Reply-To: <705982c5-5dfb-4459-82e2-3b4e17744b84n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=87.157.102.236; posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 87.157.102.236
References: <t9to17$1u6s$1@gioia.aioe.org> <85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>
<ta0as4$ge1$1@gioia.aioe.org> <705982c5-5dfb-4459-82e2-3b4e17744b84n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <44063aa9-05eb-42ee-8260-dc45215fcf7fn@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Tue, 05 Jul 2022 09:37:51 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 28
 by: minf...@arcor.de - Tue, 5 Jul 2022 09:37 UTC

Heinrich Hohl schrieb am Dienstag, 5. Juli 2022 um 11:23:47 UTC+2:
> On Tuesday, July 5, 2022 at 5:23:51 AM UTC+2, dxforth wrote:
> > For those who use SKIP and SCAN, does it specially handle TABs?
> > e.g. VFX versions treat TABs in the string as if they were BL.
> > Has it caused any issues in practice?
> SKIP and SCAN are only supposed to skip or scan for the specified character.
> Space ($20) and tab ($09) are clearly not the same characters, and the two
> words should be able to distinguish them. You may want to distinguish them!
>
> In SwiftForth, SKIP and SCAN work as expected. They will distinguish space and tab.
> Both words are code definitions and written as short as possible with no extra actions.
> This is how it should be.
>
> I looked at VFX and yes, this is weird. The definitions for SKIP and SCAN are more
> complicated than necessary and contain extra tests for $09 and $20.
>
> In my eyes this is not a good solution. Treating space and tab as identical characters
> may be convenient at times, but this requirement should be handled differently.
>
> In Forth, basic words should perform simple actions. This makes their actions predictable
> and avoids unexpected side effects.
>
> The only good thing that I can say about it is that the VFX manual clearly describes the
> unusual behavior of SKIP and SCAN:
> "Note that when a space char is given, tabs are also ignored."
>

Things shouldn't be taken too religiously. The standard speaks even of ignoring
whitespaces for some words.

Re: SKIP/SCAN - what modern forth doesn't have it?

<ta17ga$13rp$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18910&group=comp.lang.forth#18910

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
Date: Tue, 5 Jul 2022 21:32:27 +1000
Organization: Aioe.org NNTP Server
Message-ID: <ta17ga$13rp$1@gioia.aioe.org>
References: <t9to17$1u6s$1@gioia.aioe.org>
<85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>
<ta0as4$ge1$1@gioia.aioe.org>
<705982c5-5dfb-4459-82e2-3b4e17744b84n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="36729"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Tue, 5 Jul 2022 11:32 UTC

On 5/07/2022 19:23, Heinrich Hohl wrote:
> On Tuesday, July 5, 2022 at 5:23:51 AM UTC+2, dxforth wrote:
>> For those who use SKIP and SCAN, does it specially handle TABs?
>> e.g. VFX versions treat TABs in the string as if they were BL.
>> Has it caused any issues in practice?
>
> SKIP and SCAN are only supposed to skip or scan for the specified character.
> Space ($20) and tab ($09) are clearly not the same characters, and the two
> words should be able to distinguish them. You may want to distinguish them!
>
> In SwiftForth, SKIP and SCAN work as expected. They will distinguish space and tab.
> Both words are code definitions and written as short as possible with no extra actions.
> This is how it should be.
>
> I looked at VFX and yes, this is weird. The definitions for SKIP and SCAN are more
> complicated than necessary and contain extra tests for $09 and $20.

Specifically it checks input char read - if $09 it substitutes $20 and compares
that against the reference.
> In my eyes this is not a good solution. Treating space and tab as identical characters
> may be convenient at times, but this requirement should be handled differently.

It means SCASB can't be employed and $09 becomes opaque. OTOH it simplifies
text parsing. Lines containing tabs won't require additional handling.

> In Forth, basic words should perform simple actions. This makes their actions predictable
> and avoids unexpected side effects.

That's the question. I currently use the classic SKIP/SCAN. Am I gaining
anything by staying with it, or would I be better off switching to what VFX
and FlashForth uses? FlashForth likely hasn't had much use but VFX presumably
has.

> The only good thing that I can say about it is that the VFX manual clearly describes the
> unusual behavior of SKIP and SCAN:
> "Note that when a space char is given, tabs are also ignored."

What it omits to say is that when tab is given, it will never be found :)

Re: SKIP/SCAN - what modern forth doesn't have it?

<ta1ht2$3nq6g$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18912&group=comp.lang.forth#18912

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: step...@vfxforth.com (Stephen Pelc)
Newsgroups: comp.lang.forth
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
Date: Tue, 5 Jul 2022 14:29:54 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <ta1ht2$3nq6g$1@dont-email.me>
References: <t9to17$1u6s$1@gioia.aioe.org> <85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com> <ta0as4$ge1$1@gioia.aioe.org> <705982c5-5dfb-4459-82e2-3b4e17744b84n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Jul 2022 14:29:54 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="ad9ba3d3dc8c40d05f17f68b8fb8e7e6";
logging-data="3926224"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1M8hRndyXilJOFKhGJmH9"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:OKat+VYChBJNVmKxwvlVYChIx3w=
X-Usenapp: v1.22/l - Full License
 by: Stephen Pelc - Tue, 5 Jul 2022 14:29 UTC

On 5 Jul 2022 at 11:23:45 CEST, "Heinrich Hohl" <hheinrich.hohl@gmail.com>
wrote:

> I looked at VFX and yes, this is weird. The definitions for SKIP and SCAN are
> more
> complicated than necessary and contain extra tests for $09 and $20.
>
> In my eyes this is not a good solution. Treating space and tab as identical
> characters
> may be convenient at times, but this requirement should be handled differently.
>
> In Forth, basic words should perform simple actions. This makes their actions
> predictable
> and avoids unexpected side effects.
>
> The only good thing that I can say about it is that the VFX manual clearly
> describes the
> unusual behavior of SKIP and SCAN:
> "Note that when a space char is given, tabs are also ignored."

The behaviour come from when we swtched from block files to text files.
We wished to retain the ability to keep source in chunks, and to keep the
text small, so we treated ^L (12) as a page separator and TAB (9) as white
space. At that time many text editors behaved the same way.

This behaviour has, to our knowledge, only inconvenienced one client
in the last 30 years or more, and they just redefined SKIP and SCAN
in their application. Apart from that client this behaviour has created no
technical support. I believe it is in the spirit of the ANS and following
standards use of the term "whitespace".

Stephen

--
Stephen Pelc, stephen@vfxforth.com
MicroProcessor Engineering, Ltd. - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, +44 (0)78 0390 3612, +34 649 662 974
http://www.mpeforth.com - free VFX Forth downloads

Re: SKIP/SCAN - what modern forth doesn't have it?

<2022Jul5.173251@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18916&group=comp.lang.forth#18916

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
Date: Tue, 05 Jul 2022 15:32:51 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 38
Message-ID: <2022Jul5.173251@mips.complang.tuwien.ac.at>
References: <t9to17$1u6s$1@gioia.aioe.org> <85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com> <ta0as4$ge1$1@gioia.aioe.org> <705982c5-5dfb-4459-82e2-3b4e17744b84n@googlegroups.com> <ta1ht2$3nq6g$1@dont-email.me>
Injection-Info: reader01.eternal-september.org; posting-host="95fc7f36edda024a93ccf81aa524727e";
logging-data="3935210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194eZ99bu/FAlTnOehFe0m9"
Cancel-Lock: sha1:v7ok9EuxeyG0OZtH25ABSEWgUrw=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 5 Jul 2022 15:32 UTC

Stephen Pelc <stephen@vfxforth.com> writes:
>The behaviour come from when we swtched from block files to text files.
>We wished to retain the ability to keep source in chunks, and to keep the
>text small, so we treated ^L (12) as a page separator and TAB (9) as white
>space. At that time many text editors behaved the same way.

11.3.5
|When parsing from a text file using a space delimiter, control
|characters shall be treated the same as the space character.

[funky behaviour of SKIP and SCAN in VFX]
>I believe it is in the spirit of the ANS

It certainly does: Systems are allowed to implement non-standard words
like SKIP and SCAN with whatever semantics they like. And apparently
that's what's happening. Let's see:

s\" \x01\z\v\f\t abc" bl scan . c@ .

Gforth prints 4 32
iForth 5.1-mini prints 5 9
lxf prints 4 32
SwiftForth 3.11 prints 4 32
vfx64 5.11 prints 5 9

>and following
>standards use of the term "whitespace".

I'm not sure the standard uses that term. I certainly does not in the
sentence I cited above.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: http://www.euroforth.org/ef22/cfp.html

Re: SKIP/SCAN - what modern forth doesn't have it?

<ta1nbl$r08$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18917&group=comp.lang.forth#18917

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
Date: Wed, 6 Jul 2022 02:03:00 +1000
Organization: Aioe.org NNTP Server
Message-ID: <ta1nbl$r08$1@gioia.aioe.org>
References: <t9to17$1u6s$1@gioia.aioe.org>
<85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>
<ta0as4$ge1$1@gioia.aioe.org>
<705982c5-5dfb-4459-82e2-3b4e17744b84n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="27656"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Tue, 5 Jul 2022 16:03 UTC

On 5/07/2022 19:23, Heinrich Hohl wrote:
> ...
> In SwiftForth, SKIP and SCAN work as expected. They will distinguish space and tab.
> Both words are code definitions and written as short as possible with no extra actions.
> This is how it should be.
>
> I looked at VFX and yes, this is weird. The definitions for SKIP and SCAN are more
> complicated than necessary and contain extra tests for $09 and $20.
>
> In my eyes this is not a good solution. Treating space and tab as identical characters
> may be convenient at times, but this requirement should be handled differently.

It appears NT/FORTH has SKIP SCAN (as per F83, SwiftForth etc) and two additional
ones:

BL-SKIP ( adr len -- adr' len' )

BL-SCAN ( adr len -- adr' len' )

'BL' for these means $20 and below.

This seems like a good solution. Most forths should be able to get by with one
set in the kernel and the other as loadable source for when the need arises.
Resource-restrained systems that can only afford one might consider a VFX-style
SKIP/SCAN.

Re: SKIP/SCAN - what modern forth doesn't have it?

<51841e7b-9590-45fe-ae4b-fed81f99b94fn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18919&group=comp.lang.forth#18919

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:14d2:b0:31d:3a01:3db2 with SMTP id u18-20020a05622a14d200b0031d3a013db2mr18272961qtx.575.1657039354900;
Tue, 05 Jul 2022 09:42:34 -0700 (PDT)
X-Received: by 2002:a05:622a:2c7:b0:31d:3cc2:3439 with SMTP id
a7-20020a05622a02c700b0031d3cc23439mr16888620qtx.185.1657039354725; Tue, 05
Jul 2022 09:42:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 5 Jul 2022 09:42:34 -0700 (PDT)
In-Reply-To: <2022Jul5.173251@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f14:600:fcd2:8256:e0ac:617d;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f14:600:fcd2:8256:e0ac:617d
References: <t9to17$1u6s$1@gioia.aioe.org> <85102527-f82a-4ddb-9638-70d83174cad8n@googlegroups.com>
<ta0as4$ge1$1@gioia.aioe.org> <705982c5-5dfb-4459-82e2-3b4e17744b84n@googlegroups.com>
<ta1ht2$3nq6g$1@dont-email.me> <2022Jul5.173251@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <51841e7b-9590-45fe-ae4b-fed81f99b94fn@googlegroups.com>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Tue, 05 Jul 2022 16:42:34 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 29
 by: Marcel Hendrix - Tue, 5 Jul 2022 16:42 UTC

On Tuesday, July 5, 2022 at 5:54:35 PM UTC+2, Anton Ertl wrote:
> Stephen Pelc <ste...@vfxforth.com> writes:
[..]
> [funky behaviour of SKIP and SCAN in VFX]
> >I believe it is in the spirit of the ANS
> It certainly does: Systems are allowed to implement non-standard words
> like SKIP and SCAN with whatever semantics they like. And apparently
> that's what's happening. Let's see:
>
> s\" \x01\z\v\f\t abc" bl scan . c@ .
>
>
> Gforth prints 4 32
> iForth 5.1-mini prints 5 9
> lxf prints 4 32
> SwiftForth 3.11 prints 4 32
> vfx64 5.11 prints 5 9

FORTH> help scan
SCAN IFORTH
( c-addr1 u1 delimiter -- c-addr2 u2 )
Scan the string identified by c-addr1 u1 for delimiter. If this
character is found, leave its address in c-addr2 and the count remaining
in u2, otherwise c-addr2 points after the string and u2 is 0.
When the delimiter is not a <tab>, <lf> or <cr>, all three of these
characters are considered equivalent to a space.
This means BL SCAN is a special case.
See also: SKIP

-marcel

Re: SKIP/SCAN - what modern forth doesn't have it?

<nnd$61cc159a$5123654d@00545cf6f8137a11>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18920&group=comp.lang.forth#18920

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <t9to17$1u6s$1@gioia.aioe.org> <705982c5-5dfb-4459-82e2-3b4e17744b84n@googlegroups.com> <ta1ht2$3nq6g$1@dont-email.me> <2022Jul5.173251@mips.complang.tuwien.ac.at>
Subject: Re: SKIP/SCAN - what modern forth doesn't have it?
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$61cc159a$5123654d@00545cf6f8137a11>
Organization: KPN B.V.
Date: Tue, 05 Jul 2022 19:09:02 +0200
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!npeer.as286.net!npeer-ng0.as286.net!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 52
Injection-Date: Tue, 05 Jul 2022 19:09:02 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2523
 by: none - Tue, 5 Jul 2022 17:09 UTC

In article <2022Jul5.173251@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>Stephen Pelc <stephen@vfxforth.com> writes:
>>The behaviour come from when we swtched from block files to text files.
>>We wished to retain the ability to keep source in chunks, and to keep the
>>text small, so we treated ^L (12) as a page separator and TAB (9) as white
>>space. At that time many text editors behaved the same way.
>
>11.3.5
>|When parsing from a text file using a space delimiter, control
>|characters shall be treated the same as the space character.
>
>[funky behaviour of SKIP and SCAN in VFX]
>>I believe it is in the spirit of the ANS
>
>It certainly does: Systems are allowed to implement non-standard words
>like SKIP and SCAN with whatever semantics they like. And apparently
>that's what's happening. Let's see:
>
>s\" \x01\z\v\f\t abc" bl scan . c@ .
>
>
>Gforth prints 4 32
>iForth 5.1-mini prints 5 9
>lxf prints 4 32
>SwiftForth 3.11 prints 4 32
>vfx64 5.11 prints 5 9
>
>>and following
>>standards use of the term "whitespace".
>
>I'm not sure the standard uses that term. I certainly does not in the
>sentence I cited above.

I have separated out ?BLANK that decides whether a character is to
be considered a blank in ciforth.
This is default:
: ?BLANK BL 1+ < ;

[All colon definitions in ciforth can be revectored.]

>
>- anton

Groetjes Albert
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor