Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/talogo.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-01-29 14:08:09 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-01-29 14:08:09 (GMT)
commite322350dcd6b7c7ffa8e665f0587b87148310b38 (patch)
treea380702e8eee6bc26d51b449235f152544c33abb /talogo.py
parent9cb44a3809d307bbbddd66fc08006f7bf9713b68 (diff)
fixed label docking problem
Diffstat (limited to 'talogo.py')
-rw-r--r--talogo.py36
1 files changed, 23 insertions, 13 deletions
diff --git a/talogo.py b/talogo.py
index 28177a8..e7b3f7d 100644
--- a/talogo.py
+++ b/talogo.py
@@ -55,8 +55,10 @@ class symbol:
self.nargs = None
self.fcn = None
- def __str__(self): return self.name
- def __repr__(self): return '#'+self.name
+ def __str__(self):
+ return self.name
+ def __repr__(self):
+ return '#'+self.name
class logoerror(Exception):
def __init__(self, value):
@@ -332,24 +334,32 @@ def prim_define(name, body):
name.nargs, name.fcn = 0, body
name.rprim = True
-def prim_stack(lc,stri):
- if (not lc.stacks.has_key('stack3'+stri)) or \
- lc.stacks['stack3'+stri] is None: raise logoerror("#nostack")
- icall(lc, evline, lc.stacks['stack3'+stri][:]); yield True
+def prim_stack(lc, str):
+ if (not lc.stacks.has_key('stack3'+str)) or lc.stacks['stack3'+str] is None:
+ raise logoerror("#nostack")
+ icall(lc, evline, lc.stacks['stack3'+str][:])
+ yield True
lc.procstop = False
- ireturn(lc); yield True
+ ireturn(lc)
+ yield True
def prim_stack1(lc):
- if lc.stacks['stack1'] is None: raise logoerror("#nostack")
- icall(lc, evline, lc.stacks['stack1'][:]); yield True
+ if lc.stacks['stack1'] is None:
+ raise logoerror("#nostack")
+ icall(lc, evline, lc.stacks['stack1'][:])
+ yield True
lc.procstop = False
- ireturn(lc); yield True
+ ireturn(lc)
+ yield True
def prim_stack2(lc):
- if lc.stacks['stack2'] is None: raise logoerror("#nostack")
- icall(lc, evline, lc.stacks['stack2'][:]); yield True
+ if lc.stacks['stack2'] is None:
+ raise logoerror("#nostack")
+ icall(lc, evline, lc.stacks['stack2'][:])
+ yield True
lc.procstop = False
- ireturn(lc); yield True
+ ireturn(lc)
+ yield True
def prim_stopstack(lc):
lc.procstop = True