[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Plus and Minus operators
From: |
Dan Wamba |
Subject: |
Plus and Minus operators |
Date: |
Mon, 2 Jul 2001 21:00:08 +0400 (MSD) |
Hi,
I have some comments on eq...
I continue writing my large Lout document, which
includes a lot of maths also. I find Lout sometimes
wordy [which is necessary to keep it flexible] but
extremely useful :-)
Minor problem was: I was unhappy the eqf file defines
"+" and "-" as {bin plus} and {bin minus}, because
/silly example only/:
-C = 1 + 2 {first - is not binary}
is better than
- C = 1 + 2
But it was __easy__ to fix it
def "-"
left x
{
@Case x
{
"" @Yield minus
"(" @Yield {x minus}
"[" @Yield {x minus}
else @Yield {x bin minus}
}
}
It works better than the default, I think.
I even wanted f(t+1) = f(t) - f(t-1) ...
/you think about it if you have a lot of such
equations/
And I have defined "-" in the way as follows therefore
def "-"
left x
right y
{
x @Case
{
"" @Yield {x minus y}
( @Yield {x minus y}
[ @Yield {x minus y}
t @Yield {x minus y}
tau @Yield {x minus y}
else @Yield
{
y @Case
{
t @Yield {x minus y}
tau @Yield {x minus y}
else @Yield {x bin minus y}
}
}
}
}
That's not so nice :-(. I think it would
be better for "-" and "+" to obey the spaces around
them. I AM NOT ABLE TO PROGRAM THIS IN LOUT. Is it
possible or not? I was also surprised I have to write
f( t+1 ) to make "+" obvious that the left argument is
t and not f(t. Is that correct??? Where do objects
start? After a whitespace?
I think it would be GREAT to introduce
1. left word x
2. left character x
3. ???
...
Is that a good idea?
best regards
DANIEL
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
- Plus and Minus operators,
Dan Wamba <=