gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a253dd1)
raw | patch | inline | side by side (parent: a253dd1)
author | Doni Pracner <quinnuendo@gmail.com> | |
Wed, 8 Jan 2014 22:10:27 +0000 (23:10 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Wed, 8 Jan 2014 22:22:21 +0000 (23:22 +0100) |
src/mjc2wsl.java | patch | blob | history |
diff --git a/src/mjc2wsl.java b/src/mjc2wsl.java
index d098bd8e2069d97e23df332a754c6e835aa487b8..05a8a32fab2ee297acf28a8f17d53d57c682886d 100644 (file)
--- a/src/mjc2wsl.java
+++ b/src/mjc2wsl.java
break;
}
- //TODO read, print
+ // read, print
+ case bread:
case read: {
+ //TODO make it a char for read
prl("tempa := @String_To_Num(@Read_Line(Standard_Input_Port));");
prl(cmdToEStack("tempa"));
break;
}
// the prints
- case bprint: {
- prl(getTopTwo());
- prl("PRINT(tempb);");
- break;
- }
+ case bprint:
case print: {
- // TODO need to make it a char
+ // TODO need to make it a char on print
+ // TODO printing numbers needs different lengths of spacing
prl(getTopTwo());
- prl("PRINT(tempb);");
+ pr(createComment("print spacing",C_SPEC));
+ prl("IF tempa>1 THEN FOR i:=2 TO tempa STEP 1 DO PRINFLUSH(\" \") OD FI;");
+ prl("PRINFLUSH(tempb);");
break;
}