From ea20dad4a929cfe453f4ab10bb6c7cfc5691099e Mon Sep 17 00:00:00 2001 From: SMcNeill Date: Sat, 1 Aug 2015 22:41:48 -0400 Subject: [PATCH] Fix to PRINT text$; USING format$; values Added _SCREENHIDE as a FUNCTION to return 0/-1 if the screen is hidden or not. --- internal/c/libqb.cpp | 2 ++ internal/c/qbx.cpp | 1 + source/qb64.bas | 19 +++++++++---------- source/subs_functions/subs_functions.bas | 9 +++++++++ 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index a777ff091..54912bdf5 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -28464,6 +28464,8 @@ void sub__maptriangle(int32 cull_options,float sx1,float sy1,float sx2,float sy2 screen_hide=1; } + int32 func__screenhide(){return -screen_hide;} + void sub__consoletitle(qbs* s){ if (new_error) return; static qbs *sz=NULL; if (!sz) sz=qbs_new(0,0); diff --git a/internal/c/qbx.cpp b/internal/c/qbx.cpp index 98bb9c6a3..b21729c50 100644 --- a/internal/c/qbx.cpp +++ b/internal/c/qbx.cpp @@ -183,6 +183,7 @@ extern void sub_shell3(qbs *str,int32 passed); extern void sub__consoletitle(qbs*); extern void sub__screenshow(); extern void sub__screenhide(); +extern int32 func__screenhide(); extern void sub__console(int32); extern int32 func__console(); extern void sub__controlchr(int32); diff --git a/source/qb64.bas b/source/qb64.bas index 1f224476d..31dcef6bf 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -9012,16 +9012,15 @@ DO GOTO redosemi END IF END IF - 'Values before Quote check will go here once my brain stops smoking from sorting out the other half - 'This will fix things like PRINT 123"xyz" to make it PRINT 123; xyz once it's implemented. - 'Brain smoke clear; let's finish this up! - IF LEFT$(LTRIM$(nextchar$), 1) = CHR$(34) THEN - IF temp1$ <> ";" AND temp1$ <> "," AND temp1$ <> "+" AND temp1$ <> "(" THEN - insertelements a$, i, ";" - insertelements ca$, i, ";" - n = n + 1 - elementon = i + 2 'just a easy way to reduce redundant calls to the routine - GOTO redosemi + IF temp1$ <> "USING" THEN + IF LEFT$(LTRIM$(nextchar$), 1) = CHR$(34) THEN + IF temp1$ <> ";" AND temp1$ <> "," AND temp1$ <> "+" AND temp1$ <> "(" THEN + insertelements a$, i, ";" + insertelements ca$, i, ";" + n = n + 1 + elementon = i + 2 'just a easy way to reduce redundant calls to the routine + GOTO redosemi + END IF END IF END IF END IF diff --git a/source/subs_functions/subs_functions.bas b/source/subs_functions/subs_functions.bas index 0f6d8d368..375e3678e 100644 --- a/source/subs_functions/subs_functions.bas +++ b/source/subs_functions/subs_functions.bas @@ -241,6 +241,15 @@ id.callname = "sub__screenhide" id.NoCloud = 1 regid +clearid +id.n = "_SCREENHIDE" +id.subfunc = 1 +id.callname = "func__screenhide" +id.ret = LONGTYPE - ISPOINTER +id.NoCloud = 1 +regid + + clearid id.n = "_CONSOLE" id.subfunc = 1