Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: VFX error? Date: Fri, 17 Oct 2014 22:04:50 -0400 Organization: Aioe.org NNTP Server Lines: 29 Message-ID: References: <5b5849fc-0165-4eef-8ddb-833862c3adde@googlegroups.com> <2014Oct10.093331@mips.complang.tuwien.ac.at> NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:33996 On Fri, 10 Oct 2014 03:33:31 -0400, Anton Ertl wrote: > jzakiya@gmail.com writes: >> For some reason when I do this: >> >> hex >> >> create xxx 11 c, 34 c, FE c, .... CD c, .... >> >> the compiler throws an error. To get around it I can do this: >> >> create xxx 11 c, 34 c, FE c, .... 0CD c, .... >> >> but that's such a cludge hack. Why does this happen? > > As someone else explained, there is a word CD in VFX, and that > collides. Prepending a 0 to a hex number is traditional Forth > practice to avoid that problem, and used to be recommended for all hex > numbers, whether there is a known collision or not. These days you > can write $cd (no need to use HEX), and I recommend using that. The best solution is to require the system to not have any constants defined which could conflict. It should use some other syntax which has no potential for conflicts. E.g., con_CD or hex_CD etc. Rod Pemberton