perl/Tk: How to make the text in the textbox Align Right?

2011-05-28 Thread z sway
Thank You!

Re: How to Generate An Expression to A LOL?

2011-04-29 Thread z sway
ged to a ref. $part = \(grow($part)) doesn't work either, it creates refs to elements in the array. 2011/4/29 Uri Guttman > >>>>> "zs" == z sway writes: > > zs> foreach $part (@part) { > zs> $part =~ s/^\(|\)$//g; > zs> my @temp = grow($pa

Re: How to Generate An Expression to A LOL?

2011-04-28 Thread z sway
Hi, I've finished it using recursion. #!/usr/bin/perl -w use strict; use Data::Dumper; #不检查输入算式是否正确 print "输入自然数算式(只允许加法、乘法、括号)\n"; print "输入完成按回车确认,退出请输入0\n\n"; while (1) { print "Enter the expression : "; chomp($_ = ); last if not $_; my @tree = grow($_); print Dumper(\@tree); my $result = c

Re: How to Generate An Expression to A LOL?

2011-04-25 Thread z sway
in private (unintentionally, I presume), so I'm CCing the > list on my reply (I hope it's OK). > > On Monday 25 Apr 2011 12:07:54 z sway wrote: > > Hi,sorry I hadn't said it clearly,what I want to do is to generate a LOL > > from an expression and try* *not to use a

How to Generate An Expression to A LOL?

2011-04-24 Thread z sway
the expression only contains number and"+*()" the form of list is like[op,node1,node2...],op is "+"or"*",node can be a number or a child list. e.g :1*2+3*4*(5+6) [ '+', ['*', '1', '2'], ['*', '3', '4', ['+','5', '6'] ] ] Thanks!