EOS 2  1.1.0
Einfache Objektbasierte Sprache
StoreVariable.java
gehe zur Dokumentation dieser Datei
1 package de.lathanda.eos.vm.commands;
2 
3 import de.lathanda.eos.vm.Command;
4 import de.lathanda.eos.vm.Machine;
5 
12 public class StoreVariable extends Command {
13  private final String variable;
14 
15  public StoreVariable(String variable) {
16  this.variable = variable;
17  }
18 
19  @Override
20  public boolean execute(Machine m) throws Exception {
21  m.set(variable, m.pop());
22  return true;
23  }
24 
25  @Override
26  public String toString() {
27  return "StoreVariable{" + variable + '}';
28  }
29 
30 }
Impressum