From dc22c6e5a8cd1124b8b7f50505f927a80291427f Mon Sep 17 00:00:00 2001 From: SteveMcNeill Date: Wed, 2 Aug 2017 21:40:32 -0400 Subject: [PATCH] Print Output Simplification Minor change to simplify and clean up the output which QB64 creates with PRINT statements with multiple print segments such as PRINT "A"; "B"; "C". --- .gitignore | 2 ++ source/global/version.bas | 2 +- source/qb64.bas | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index cfd049e7c..8f23425a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ internal/c/c_compiler internal/temp +internal/temp2 +internal/temp3 *.o *.a *.exe diff --git a/source/global/version.bas b/source/global/version.bas index 12b29d325..b6fb0808d 100644 --- a/source/global/version.bas +++ b/source/global/version.bas @@ -4,4 +4,4 @@ DIM SHARED AutoBuildMsg AS STRING Version$ = "1.1" 'BuildNum format is YYYYMMDD/id, where id is a ever-increasing 'integer. If you make a change, update the date and increase the id! -BuildNum$ = "20170802/57" +BuildNum$ = "20170802/58" diff --git a/source/qb64.bas b/source/qb64.bas index 1652669f8..fc306b850 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -22470,6 +22470,7 @@ END IF b = 0 e$ = "" last = 0 +PRINT #12, "tqbs=qbs_new(0,0);" 'initialize the temp string FOR i = 2 TO n a2$ = getelement(ca$, i) IF a2$ = "(" THEN b = b + 1 @@ -22501,12 +22502,10 @@ FOR i = 2 TO n END IF IF (typ AND ISREFERENCE) THEN e$ = refer(e$, typ, 0) IF Error_Happened THEN EXIT SUB - PRINT #12, "tqbs=qbs_new(0,0);" PRINT #12, "qbs_set(tqbs," + e$ + ");" PRINT #12, "if (new_error) goto skip" + u$ + ";" IF lp THEN PRINT #12, "lprint_makefit(tqbs);" ELSE PRINT #12, "makefit(tqbs);" PRINT #12, "qbs_" + lp$ + "print(tqbs,0);" - PRINT #12, "qbs_free(tqbs);" ELSE IF a2$ = "," THEN l$ = l$ + sp + a2$ IF a2$ = ";" THEN @@ -22533,6 +22532,7 @@ NEXT IF LEN(e$) THEN a2$ = "": last = 1: GOTO printlast IF n = 1 THEN PRINT #12, "qbs_" + lp$ + "print(nothingstring,1);" PRINT #12, "skip" + u$ + ":" +PRINT #12, "qbs_free(tqbs);" PRINT #12, cleanupstringprocessingcall$ + "0);" IF lp THEN PRINT #12, "tab_LPRINT=0;" tlayout$ = l$