Codebase list ohcount / d62f219c-a984-415f-b69c-f521b00b8f15/main test / expected_dir / factor1.factor
d62f219c-a984-415f-b69c-f521b00b8f15/main

Tree @d62f219c-a984-415f-b69c-f521b00b8f15/main (Download .tar.gz)

factor1.factor @d62f219c-a984-415f-b69c-f521b00b8f15/mainraw · history · blame

factor	comment	! This is a comment
factor	comment	! Factor syntax is very simple, it just contains words separated by spaces
factor	comment	! '!' is a line comment word
factor	comment	! "whatever" is a string word
factor	code	USING: kernel io ; ! This is a vocabulary inclusion word
factor	code	IN: testing
factor	blank	
factor	code	: test-string ( -- )
factor	code	  "this is a string" print ;
factor	blank	
factor	code	: test ( x -- y ) ! Parenthesis define a stack effect declaration
factor	code	  dup swap drop ;
factor	blank	
factor	code	MAIN: test