Example #1
0
 public void Input_Start_Variable(string name)
 {
     input_name    = name;
     kind_of_input = input_kind.variable;
     Indent();
     stream.Write("cout << ");
 }
Example #2
0
 public void Input_Start_Array_1D(string name, parse_tree.expression reference)
 {
     dest_is_array = true;
     this.Array_1D_Assignment_Start(name);
     reference.emit_code(this, 0);
     this.Array_1D_Assignment_After_Index();
     kind_of_input = input_kind.array;
 }
Example #3
0
 public void Input_Start_Array_1D(string name, parse_tree.expression reference)
 {
     input_name      = name;
     kind_of_input   = input_kind.array;
     input_reference = reference;
     Indent();
     stream.Write("cout << ");
 }
Example #4
0
 public void Input_Start_Array_2D(string name, parse_tree.expression reference,
                                  parse_tree.expression reference2)
 {
     input_name       = name;
     kind_of_input    = input_kind.array2d;
     input_reference  = reference;
     input_reference2 = reference2;
     Indent();
     stream.Write("Put_Line(");
 }
Example #5
0
 public void Input_Start_Array_2D(string name, parse_tree.expression reference,
                                  parse_tree.expression reference2)
 {
     dest_is_array = true;
     this.Array_2D_Assignment_Start(name);
     reference.emit_code(this, 0);
     this.Array_2D_Assignment_Between_Indices();
     reference2.emit_code(this, 0);
     this.Array_2D_Assignment_After_Indices();
     kind_of_input = input_kind.array2d;
 }
Example #6
0
 // if file then readLine else display input dialog
 public void Input_Start_Variable(string name)
 {
     input_name = name;
     kind_of_input = input_kind.variable;
     Indent();
     if (readFile)
         stream.WriteLine(input_name + " = read???();");
     else
         stream.Write(input_name + " = get???(");
     // indent_level -= 3;
 }
Example #7
0
 public void Input_Start_Array_1D(string name, parse_tree.expression reference)
 {
     input_name = name;
     kind_of_input = input_kind.array;
     input_reference = reference;
     Indent();
     stream.Write(input_name + "[");
     input_reference.emit_code(this, 0);
     if (readFile)
         stream.Write("] = read???();");
     else
         stream.Write("] = get???(");
 }
Example #8
0
 public void Input_Start_Array_2D(string name, parse_tree.expression reference,
                                  parse_tree.expression reference2)
 {
     input_name       = name;
     kind_of_input    = input_kind.array2d;
     input_reference  = reference;
     input_reference2 = reference2;
     stream.Write(input_name + "[");
     input_reference.emit_code(this, 0);
     stream.Write("][");
     input_reference2.emit_code(this, 0);
     if (readFile)
     {
         stream.Write("] = read???();");
     }
     else
     {
         stream.Write("] = get???(");
     }
 }
Example #9
0
 public void Input_Start_Variable(string name)
 {
     dest_is_array = false;
     this.Variable_Assignment_Start(name);
     kind_of_input = input_kind.variable;
 }