projects
/
egate.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Minor changes.
[egate.git]
/
fml
/
power.fml
1
# FML power and multiplication.
2
#
3
# $Id: power.fml,v 1.1 1995/02/06 13:48:09 adam Exp $
4
5
\bin Mult a b {
6
\set val 0
7
\set l 0
8
\while {\l \lt \b}
9
{
10
\set val {\val \plus \a}
11
\set l {\l \plus 1}
12
}
13
\return \val
14
}
15
16
\func Power a b {
17
\set l 0
18
\set val 1
19
\while {\l \lt \b}
20
{
21
\set val {\val \Mult \a}
22
\set l {\l \plus 1}
23
}
24
\return \val
25
}
26
\Power 3 5