Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: Yet another draw of rectangle Date: Sat, 19 Nov 2016 20:01:08 -0800 Organization: A noiseless patient Spider Lines: 23 Message-ID: <87bmxadcl7.fsf@nightsong.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="e192331f7a5596d9d1fa38161319e938"; logging-data="14850"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lmBD2NWxPN8Nv928Gmt0S" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:jrxEOAiu2e5RiyI7/N3s6NlR97w= sha1:XqRVN33Cp7wfBY3PqCH2KhV+v3c= Xref: csiph.com comp.lang.forth:52750 "HAA" writes: > Nice but return stack version posted by Gerry circa 1/2015 gets my tick - > 13 instructions (excluding initial move) in one definition compared to 16 > split over two here. No tick for appealing to sensibilities of non-Forthers > as they will never be pleased viz. WJ :) Is this ok? : LINE swap . . cr ; : rect ( x0 y0 x1 y1 ) 2over 2over ( x0 y0 x1 y1 x0 y0 x1 y1 ) -rot swap ( x0 y0 x1 y1 x0 y1 x1 y0 ) LINE ( x0 y0 x1 y1 x0 y1 ) 2over LINE ( x0 y0 x1 y1 x0 y1 ) LINE ( x0 y0 x1 y1 ) 2drop LINE ; : test 0 10 1 11 rect ; Looks like 10 instructions? Test parameters are 0 and 1 for x coordinates, 10 and 11 for y coordinates.