Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: FORTH LITE TUTORIAL based on MPE VFX Date: Fri, 01 Aug 2014 19:57:07 -0400 Organization: Aioe.org NNTP Server Lines: 50 Message-ID: References: <557e2d7a-6003-42af-803b-5d21a00315bd@googlegroups.com> <31f28699-46bc-4f5b-a1f2-565d663dfd3e@googlegroups.com> <8bGdnfzw1fKiUjjOnZ2dnUVZ_qWdnZ2d@supernews.com> <2555af92-2741-4788-b672-086a7e92ae28@googlegroups.com> <1151afb8-b7e9-4a03-9048-ff45ad4f5889@googlegroups.com> <89637270-d912-47ae-bfd8-b0b6dc791b8f@googlegroups.com> <9e84048b-df9a-423f-a69b-bd36abdb53f0@googlegroups.com> <53d76754.1753427010@news.demon.co.uk> <51ce0541-fd1b-4fe2-8862-3a35fe82be6a@googlegroups.com> <328ca225-3a72-47d4-846a-c59bad359740@googlegroups.com> <82f4587c-06b1-4329-a33c-bb45da376148@googlegroups.com> 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:32819 On Thu, 31 Jul 2014 00:42:34 -0400, wrote: > Yes, Forth has no syntax, so any editor that looks for syntax is going > to have problems. > > Anything that looks for syntax has problems. For example, my MACRO: > looks for a ; so that it knows when to stop saving lines of source-code > --- but it can get messed up if there is a ; in a comment or a literal > string, or a word like FOO;BAR being used, etc.. > Officially, Forth has no syntax because it's space delimited. But, Forth has developed syntax. I've mentioned this before, to Ms. Rather, I believe. The more Forth is used and the more standardized it becomes and the more feature rich it becomes, the more this will occur. It's an inevitability. Perhaps, you need to actually see it in order to believe it: FORTH \ for a comment line C // for a comment line FORTH ( ) for a comment C /* */ for a comments FORTH : ; to indicate a function C {} to indicate a function or code block FORTH ( ) for the stack picture FORTH { } for locals C () around procedure parameters FORTH [] around the names of compiler version of words FORTH () around the names of of low-level words It's syntax in C, so why isn't it in Forth? Please, don't say space delimiting is sufficient to make it not so. C can be coded space delimited too. The only large syntax difference is that Forth's flow control words, e.g., IF ELSE THEN BEGIN AGAIN UNTIL DO ?DO LOOP +LOOP etc, are self-blocking similar to many scripting languages or block-structured languages, such as COBOL. The other trivial difference is that Forth sometimes uses symbols for operators, e.g., @ ! = <= >= <> etc but other times uses text, e.g., AND OR XOR. C uses symbols for all operators. C has a much larger set of operators. Rod Pemberton