Skip to content

Commit

Permalink
添加lesson03函数
Browse files Browse the repository at this point in the history
  • Loading branch information
idisblueflash committed Mar 22, 2011
1 parent 3808c09 commit 378df75
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions perl/mod/t/main.t
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,27 @@ while (1) {

sub lesson3 {
my $vm = shift ;
my $xt = shift ;
my $v ;

if ( $vm->KVMFindWord("+") == 0 ){
$vm->addbasicword();
}

foreach my $token (@{$vm->{tib}}){
$xt = $vm->KVMFindWord($token);
if ($xt){
$xt ; #excute!
}else{
$v = 0 + $token ;
if ( $v == 0 && 0 != ( $token eq '0') ) {
print "Unkown Command $token.\n";
}else{
$vm->KVMPush($token);
}
}
}
$vm->KVMDumpStack();

}

Expand Down

0 comments on commit 378df75

Please sign in to comment.