2009-03-28 19:26:20 +01:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<title>TTCalc - user defined variables and functions</title>
|
|
|
|
<link rel="stylesheet" href="styles.css" type="text/css">
|
|
|
|
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
|
|
|
|
<param name="Keyword" value="user defined variables">
|
|
|
|
<param name="Keyword" value="user defined functions">
|
|
|
|
</object>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h1>User defined variables and functions</h1>
|
|
|
|
|
|
|
|
<p>
|
2009-04-02 12:26:55 +02:00
|
|
|
You are allowed to define your own variables and functions. As a name of a variable or function
|
|
|
|
can be a name consists of letters, digits or an underline character (only the first character must be a letter).
|
2009-03-28 19:26:20 +01:00
|
|
|
From version 0.8.3 names are case-sensitive that means 'name' is not the same as 'NaMe'. For example these
|
2009-04-02 12:26:55 +02:00
|
|
|
are correct names: a, b, c3, MyName. During defining variables and functions you can call another
|
|
|
|
variables and functions.
|
2009-03-28 19:26:20 +01:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Functions can get maximum 9 parameters. You have to specify how many parameters your function takes and
|
|
|
|
you can refer to them by using the variable 'x' with a number from 1 to 9 ('x' without a number means 'x1').
|
2009-04-02 12:26:55 +02:00
|
|
|
For example you can define a function 'xy' as 'x1*x2' (of course without apostrophes), set the 'parameters' to '2'
|
|
|
|
and then put into the edit box expression 'xy(10;20)', the result will be '200'. Note that we use a semicolon
|
|
|
|
to separate arguments in the function.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
More complex example: myfunction(x) which returns sin(x) when the x is negative, 0 when the x is 0, and cos(x) when the x is greater than 0: <br>
|
|
|
|
myfunction(x)='if(x==0; 0; if(x<0; sin(x); cos(x)))'
|
2009-03-28 19:26:20 +01:00
|
|
|
</p>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
added: a user can change the names of variables or functions now
changed: the program uses TTMath 0.8.0 now
added: functions: from TTMath 0.8.0:
DegToDeg(deg, min, sec), DegToRad(deg), DegToRad(deg, min, sec),
RadToDeg(rad), Ceil(x), Floor(x), Sqrt(x), Sinh(x), Cosh(x),
Tanh(x) /Tgh(x)/, Coth(x) /Ctgh(x)/
added: a help
changed: from TTMath 0.8.0:
renamed: CTan() into Cot() or Ctg()
renamed: ACTan() into ACot() or ACtg()
Factorial() has a history log now (it can remember last
10 calculated values)
added: a directory 'help' with files of the help
added: a directory 'setup' with files needed to make an installer
(we're using InnoSetup Compiler to make it)
fixed: the vertical size of the main window when a user uses a different size
of the window caption (especially under the Windows XP Luna)
fixed: on Windows 9x: the program hung when a user clicks on a control
on the first tab (the procedure SetNextFocus(...) has been completely
rewritten and the flag WS_EX_CONTROLPARENT on the tab dialogs has
gone away)
fixed: when started navigating from the keyboard the program showed a wrong
variable or a funtion in the edit dialog
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@28 e52654a7-88a9-db11-a3e9-0013d4bc506e
2007-04-02 02:17:26 +02:00
|
|
|
|