From 9e84964fb3bb33b019cac3063c7944d89a0460c8 Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Wed, 30 Jul 2014 22:16:12 +0200 Subject: [PATCH] mjc2wsl - proper reading of char from the command line and then transformed to a number code --- src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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")); -- 2.25.1