Euclid supports the following commands: factor, help, variables, functions, set, quit.

factor {number}

Use the command "factor {number}" to factor an integer. Only positive integers are allowed.

run {fileName}

Use the command "run {fileName}" to run a sequence of commands in a text file. For example, suppose myFile.euclid contains the following text:

a = 10; b = 20; a * b

Then "run myFile.euclid" would result in the answer 200 being output.


Use the command "help" to get a list of commands.


Use the command "variables" to get a list of all currently defined variables.


Use the command "functions" to get a list of all currently defined functions.


Use the command "set" to set program settings. You can use this to set the precision or base.

Use the command "set precision {digits}" to set the number of digits to display after the decimal place when displaying numbers. Note that this does not affect intermediate computations. The precision is only used in determining the final representation on the screen.

Use the command "set base {base}" to set the default base when entering numbers. The default base is 10, so when you type the value "10" it is interpreted as a base 10 number with value 10. If you set the base to, for example, 2, then "10" is interpreted as a binary number and the value is 2. Results will be printed in both base 10 and the base you set.


Use the command "quit" to quit the program.

Copyright © 2003-2006 Kevin L. Gong