.. -*- mode: rst -*- .. -*- coding: utf-8 -*- .. default-role:: code .. contents:: =========== Compilation =========== licht requires ocaml >= 4.03 and ncurses .. code-block:: console # sudo aptitude install opam libncures-dev libiconv-dev $ opam install ocamlbuild curses camlzip ezxmlm ounit text menhir calendar $ make Tester avec un encoding non UTF_8 ================================= Lancement du terminal avec l'encoding .. code-block:: console LANG=fr_FR.iso8859-1 xterm -en iso8859-1 Définir l'encoding suivant : .. code-block:: console export LC_ALL=fr_FR.iso8859-1 Pour la définir avec rxvt : .. code-block:: console export LC_CTYPE=fr_FR.ISO8859-1 export LANG=fr_FR.iso8859-1 printf "\33]701;$LC_CTYPE\007" ===== Usage ===== Modes ===== You can switch between differents mode : Normal mode ----------- Allow edition and sheet modification ======= =========================== Key Action ======= =========================== **v** switch to `selection mode`_ **:** Insert commands_ **/** Search for a value **e** edit a cell content (`edition mode`_) **=** insert a formula (`edition mode`_) **y** yank a cell **p** paste a cell **DEL** delete a cell **u** undo the last action ======= =========================== Commands -------- You can insert commands with the key `:` in `Normal mode`_ =================== ====================================== Command Action =================== ====================================== **:enew** Start a new spreadsheet **:w** *filename* Save the file with the given name **:q** Quit the spreadsheet. (No confirmation will be asked if the spreadsheet has been modified) =================== ====================================== Selection mode -------------- In this mode, you can select and apply action to many cells. You can use arrow keys to extend the selection in any direction. ========= ========================= Key Action ========= ========================= **ESC** go back to `normal mode`_ **y** yank the selection **DEL** delete the selection ========= ========================= Edition mode ------------ Use the arrows to insert a reference to an other cell. Data types ========== String ------ Any value wich does not match the following types is considered as a string. You can enter a string in formula by enclosing it with a `"` (`="this a \"quote"`). Numeric ------- Any numeric value can be written directly : `123`, `-.43`. Date ---- Date are represented with this format `YYYY/MM/DD`. Any operation that can apply to Numeric can also by applied to Date. Bool ---- This type cannot be created directly. You can instead use the function `true()` and `false()` or comparaison operator. References ---------- You can reference cells in the formulas Reference to a single cell ~~~~~~~~~~~~~~~~~~~~~~~~~~ You can reference a cell by naming it (`A1`, `B22`). The value for a reference to a single cell is the value of the pointed cell. (In case of cycle between differents cell the result is unspecified but it is garanted to not loop.) Range ~~~~~ Yan can reference a range by naming the two bounds (`C6:A1`). The value is typed as a List. Undefined ~~~~~~~~~ If a reference point to an an empty cell, the content will be interpreted as Undefined Formulas ======== You can enter a formula by starting the value with `=`. The evaluation always expands the reference to other cells. Licht is provided with built-in functions. Generic comparaison ------------------- Thoses function can be applied to any value, they will never raise error =============== =============================== Function Value =============== =============================== *x* `=` *y* True if *x* equals *y* *x* `<>` *y* True if *x* does not equals *y* =============== =============================== Boolean ------- =============== =============================== Function Value =============== =============================== `true()` True `false()` False `not(Bool)` True if the parameter is False, False if the parameter is True =============== =============================== Numeric ------- In numeric functions, Undefined_ value are considered as `O` =================== ===================================== Function Value =================== ===================================== `sum(Numeric List)` Compute the sum of the list. *x* `+` *y* Add two values *x* `**` *y* Compute *x* ^ *y* =================== =====================================