blob: 970817e0a185fd0e87fbbb8473e94dc93aeb7241 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
|
.. -*- 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`).
Undefined
~~~~~~~~~
If a reference point to an an empty cell, the content will be interpreted as
Undefined. Any formula impliyng Undefined will return Error
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.
=============== ===============================
Function Value
=============== ===============================
*x* `=` *y* True if *x* equals *y*
*x* `>` *y* True if *x* > *y*
*x* `>=` *y* True if *x* >= *y*
*x* `<` *y* True if *x* < *y*
*x* `<=` *y* True if *x* <= *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
-------
=================== =====================================
Function Value
=================== =====================================
*x* `+` *y* Add two values
*x* `**` *y* Compute *x* ^ *y*
`sum(Numeric List)` Compute the sum of the list.
`rnd()` A random number between 0 and 1
=================== =====================================
|