1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-30 05:10:37 +00:00

Allow PRINT to show content in console even without a new line

Closes #74
This commit is contained in:
Fellippe Heitor 2021-10-04 00:17:21 -03:00
parent 6801e08f2f
commit ab1f20eb3b

View file

@ -10653,6 +10653,9 @@ void qbs_print(qbs* str,int32 finish_on_new_line){
static qbs* strz; if (!strz) strz=qbs_new(0,0);
qbs_set(strz,qbs_add(str,qbs_new_txt_len("\0",1)));
if (finish_on_new_line) cout<<(char*)strz->chr<<endl; else cout<<(char*)strz->chr;
#ifndef QB64_WINDOWS
std::cout.flush();
#endif
return;
}