Skip to content
Phil Burk edited this page Dec 30, 2016 · 8 revisions

DRAFT Style Guide

This guide is a work in progress. I welcome input from other developers.

PForth has very inconsistent style. I would like to have a consistent for new additions. And I may apply the new style to old code.

General

Indentation - 4 spaces, no tabs

Forth

  • Capitalize new words when they are defined.

  • Capitalize conditional words, eg. IF ELSE THEN WHILE REPEAT etc.

  • Lower case for regular words, eg. dup swap etc.

  • Align conditionals.

    : NEW.WORD ( x y -- , do something interesting ) 2dup = IF + ELSE * THEN ;

'C'

Clone this wiki locally