From: Doni Pracner Date: Wed, 30 Jul 2014 20:16:12 +0000 (+0200) Subject: mjc2wsl - proper reading of char from the command line and then transformed to a... X-Git-Tag: v0.2.0~11 X-Git-Url: https://svarog.pmf.uns.ac.rs/gitweb/?a=commitdiff_plain;h=9e84964fb3bb33b019cac3063c7944d89a0460c8;p=mjc2wsl.git mjc2wsl - proper reading of char from the command line and then transformed to a number code --- diff --git a/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java b/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java index c890fef..78f30eb 100644 --- a/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java +++ b/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java @@ -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"));