Category:Factor: Difference between revisions

m
(Add blurb about running Factor examples)
Line 32:
 
==About Factor examples on Rosetta Code==
Most of the newer examples are meant to be copied and pasted directly into the listener (Factor's REPL) where they should run without issue. In order to deploy the examples to a binarybinaries or run them as a scriptscripts, you'll need to put them in a vocabulary (e.g. <code>IN: myvocab</code> and set a <code>MAIN:</code> word which acts as the entry point for the program. If an example doesn't run, it probably means that the example only works in an older version of Factor. Most of the time, this is because certain words have been changed without maintaining backwards compatibility (e.g. <code>iota</code> became <code><iota></code> in Factor 0.98).
 
For this reason, it is advised that examples use the <code>works with</code> template to indicate which version of Factor the example works with. For example,
1,808

edits