From: Doni Pracner Date: Fri, 1 Aug 2014 12:36:14 +0000 (+0200) Subject: mjc2wsl - inline printing - use the new @Format instead of substringing X-Git-Tag: v0.2.0~8 X-Git-Url: http://svarog.pmf.uns.ac.rs/gitweb/?p=mjc2wsl.git;a=commitdiff_plain;h=caa4326027af649b03967612eed6430fc400d3ca;ds=sidebyside mjc2wsl - inline printing - use the new @Format instead of substringing --- diff --git a/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java b/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java index 9a4493c..f5714aa 100644 --- a/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java +++ b/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java @@ -676,7 +676,7 @@ public class mjc2wsl{ prl(createTopTwoEStack()); if (genInlinePrint){ prl(createComment("print spacing and transformation",C_SPEC)); - prl("PRINFLUSH(SUBSTR(\" \", 0, MIN(10, MAX(0,tempa-1))), @List_To_String(< tempb >));"); + prl("PRINFLUSH(@Format(tempa, @List_To_String(< tempb >)));"); } else prl("Print_MJ_CHAR(tempb,tempa);"); prl(createEndVar()); @@ -688,7 +688,7 @@ public class mjc2wsl{ prl(createTopTwoEStack()); if (genInlinePrint){ prl(createComment("print spacing",C_SPEC)); - prl("PRINFLUSH(SUBSTR(\" \", 0, MIN(10, MAX(0, tempa-SLENGTH(@String(tempb))))), tempb);"); + prl("PRINFLUSH(@Format(tempa,tempb));"); } else prl("Print_MJ(tempb,tempa);");