Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: minforth Newsgroups: comp.lang.forth Subject: Re: Parsing timestamps? Date: Thu, 3 Jul 2025 03:14:54 +0200 Lines: 19 Message-ID: References: <1f433fabcb4d053d16cbc098dedc6c370608ac01@i2pn2.org> <44b5f13fd49d8ddbd572ae583379d124@www.novabbs.com> <21113c70c36a86f0fd4c74c8d11d0947528ba70f@i2pn2.org> <20baae7dd561db60967a5937d2b59d9a@www.novabbs.com> <0db20ddf954106bbca40d9e83630033f108b9a8e@i2pn2.org> <87bjq5yn8i.fsf@nightsong.com> <8734bfzrdl.fsf@nightsong.com> <6dcd99ffba129d06b1f736994363eb87@www.novabbs.com> <87y0t7y9bh.fsf@nightsong.com> <2025Jul2.184144@mips.complang.tuwien.ac.at> <87ikkaxhy1.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net kajFzmZ49ev2LESafLqE5gpZWDUwKsmp5PXNPGokJmcUfqTau7 Cancel-Lock: sha1:XdnPNN6y7CDkNzgNYI6il3x9L9U= sha256:G3r5ancwxGhubf6WJzrDmfLLBfJjpmdCRVOLGHsMkeA= User-Agent: Mozilla Thunderbird In-Reply-To: <87ikkaxhy1.fsf@nightsong.com> Xref: csiph.com comp.lang.forth:133935 Am 03.07.2025 um 01:59 schrieb Paul Rubin: > Hans Bezemer writes: >> 1. Adding general locals is trivial. It takes just one single line of >> Forth. > > I don't see how to do it in one line, and trivial is a subjective term. > I'd say in any case that it's not too difficult, but one line seems > overoptimistic. Particularly, you need something like (LOCAL) in the > VM. The rest is just some extensions to the colon compiler. Your > mention of it taking 3-4 screens sounded within reason to me, and I > don't consider that to be a lot of code. I would not implement locals for simple integers only. Forth has enough stack gymnastics words for that. IMO locals only make sense if you can at least additionally handle floats and dynamic strings, preferably also structs and arrays. Such an implementation is certainly not trivial.