Re: [OpenBIOS] r502 - trunk/openbios-devel/forth/bootstrap
On 06.06.2009 16:57 Uhr, svn@openbios.org wrote:
Author: blueswirl Date: 2009-06-06 16:57:25 +0200 (Sat, 06 Jun 2009) New Revision: 502
Modified: trunk/openbios-devel/forth/bootstrap/bootstrap.fs Log: Don't add padding spaces when evaluating headerless words (Mark Cave-Ayland)
Modified: trunk/openbios-devel/forth/bootstrap/bootstrap.fs =================================================================== --- trunk/openbios-devel/forth/bootstrap/bootstrap.fs 2009-06-06 09:58:11 UTC (rev 501) +++ trunk/openbios-devel/forth/bootstrap/bootstrap.fs 2009-06-06 14:57:25 UTC (rev 502) @@ -1073,7 +1073,14 @@ begin @ ?dup while dup lfa2name - type space + + \ Don't print spaces for headerless words + dup if + type space + else + type + then +
Since the second type does nothing, this could also be written as ?dup if type space else drop then It's at most a cosmetical difference though
repeat cr ;
-- coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br. Tel.: +49 761 7668825 • Fax: +49 761 7664613 Email: info@coresystems.de • http://www.coresystems.de/ Registergericht: Amtsgericht Freiburg • HRB 7656 Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
Stefan Reinauer wrote:
Since the second type does nothing, this could also be written as
?dup if type space else drop then
It's at most a cosmetical difference though
Yeah. I realised that there were multiple ways of doing this, although maintaining "type" seemed to be retain the most clarity. BTW shouldn't that drop be 2drop to account for address and length? ATB, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063
participants (2)
-
Mark Cave-Ayland -
Stefan Reinauer