Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: Is it sill FORTH ? Date: Tue, 14 Jun 2016 17:13:39 -0700 Organization: A noiseless patient Spider Lines: 15 Message-ID: <87inxbnwb0.fsf@nightsong.com> References: <0c6bffa3-2fc9-4dfb-876a-cc6319545406@googlegroups.com> <867bd587-389a-40de-8bc4-f3af2a3b248d@googlegroups.com> <17873d92-657f-494a-8c0f-6bd2ad5d212a@googlegroups.com> <874m8wpv2l.fsf@nightsong.com> <10c7ee49-ba91-41f9-93ce-e860c6ab3cf8@googlegroups.com> <87ziqoodvp.fsf@nightsong.com> <8a368ba5-a227-40f6-afa4-5434d52694e9@googlegroups.com> <87r3bzo8vo.fsf@nightsong.com> <7723d6a9-ef5f-47e6-9407-61a76990de74@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="a4ba9f006d4fba7a97cec7431fc63985"; logging-data="8987"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QSN8f7nqU04BqTH5ulomQ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:ZHabqtYD1jY3RuqyFJ+EtHnMDPo= sha1:HY7Qui57Ht8Kw4qdlQFfRESyDms= Xref: csiph.com comp.lang.forth:48167 rickman writes: > I haven't seen anything untoward being done by the compiler if you > aren't expecting to be able to treat a constant like a variable. There's more going on than that. Writing a different value into the symbol's >BODY presumes that CONSTANT is defined something like: : CONSTANT CREATE , DOES> @ ; so the value really does live at the >body and the @ gets run by the address interpreter. But in a native-code implementation there is no address interpreter, and CONSTANT would most likely generate machine code that pushes the given immediate value onto the stack. Overwriting the >BODY and then executing it would simply send the program into the weeds.