1 ! Copyright (C) 2011-2012 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license
4 USING: ascii combinators kernel math math.parser sequences ;
8 : inch ( n -- n' ) 72.0 * ;
10 : cm ( n -- n' ) inch 2.54 / ;
12 : mm ( n -- n' ) cm 0.1 * ;
14 : pica ( n -- n' ) 12.0 * ;
16 : string>points ( str -- n )
17 dup [ digit? ] find-last drop 1 + cut
18 [ string>number ] dip {