gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
mjc2wsl - proper reading of char from the command line and then transformed to a...
authorDoni Pracner <quinnuendo@gmail.com>
Wed, 30 Jul 2014 20:16:12 +0000 (22:16 +0200)
committerDoni Pracner <quinnuendo@gmail.com>
Wed, 30 Jul 2014 20:16:12 +0000 (22:16 +0200)
src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java

index c890fefed757c443c72e6ae48d3ac3ba5f1fcad5..78f30eb36c060084259e14f7a54df26b1879bcac 100644 (file)
@@ -653,9 +653,13 @@ public class mjc2wsl{
 
                        // read, print
                        case bread: {
-                               // TODO make it a char for read
-                               messages.message("char is read like a number", TransMessages.M_WAR);
-                               prl(createComment("char is read like a number", C_SPEC));
+                               // TODO maybe we'll need a bufer for multi chars!
+                               prl(createStartVar("tempa"));
+                               prl("@Read_Line_Proc(VAR tempa, Standard_Input_Port);");
+                               prl("tempa := @String_To_List(tempa)[1];");
+                               prl(createToEStack("tempa"));
+                               prl(createEndVar());
+                               break;
                        }
                        case read: {
                                prl(createStartVar("tempa"));
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner