Search found 13 matches

by skogtun
Jul 28, 2020 17:29
Forum: General
Topic: Extremely slow screen handling
Replies: 4
Views: 837

Re: Extremely slow screen handling

Possible duplicate of this: https://www.freebasic.net/forum/viewtopic.php?t=26204 Try removing the TAB(10) from your code, and see if there is any improvement. It seems that the TAB instructions causes some severe slow down on some linux terminals That is the bug in FreeBASIC. The PRINT TAB(10) is ...
by skogtun
Jul 28, 2020 14:26
Forum: General
Topic: Extremely slow screen handling
Replies: 4
Views: 837

Re: Extremely slow screen handling

Yes Linux, this is with xterm, the fastest terminal emulator I have found. xfce-terminal is even slower.

xfce4-terminal, FreeBASIC:
real 72m45,851s
user 0m7,006s
sys 0m7,868s

xfce4-terminal, BWBasic:
real 0m0,875s
user 0m0,629s
sys 0m0,188s
by skogtun
Jul 22, 2020 19:52
Forum: General
Topic: Extremely slow screen handling
Replies: 4
Views: 837

Extremely slow screen handling

This is ridicolous: $ cat tab.bas 10 FOR i=1 TO 100000 20 PRINT i;TAB(10);"Hello world" 30 NEXT i $ fbc -lang qbasic -O 2 tab.bas $ time tab real 1m19,011s user 0m1,623s sys 0m1,705s $ time bwbasic tab.bas real 0m3,783s user 0m0,647s sys 0m0,188s $ time gplbasic tab.bas real 0m3,730s user ...
by skogtun
Mar 14, 2018 13:27
Forum: Beginners
Topic: "date" returns wrong format
Replies: 8
Views: 1798

Re: "date" returns wrong format

Another approach is, write your own Date-Changer Function as below: Function CHDate() ByRef As Const String ' write protected! swiss date format Static As String CH_Date, cDate ' swiss/current (american) date If cDate <> Date Then ' date change or first call, only! cDate = Date ' save current ameri...
by skogtun
Mar 14, 2018 13:27
Forum: Beginners
Topic: "date" returns wrong format
Replies: 8
Views: 1798

Re: "date" returns wrong format

dodicat wrote:For curiosity, does this work on your system?

Here I get:
Tue Mar 13 23:51:34 2018
Yes, I get the same result
by skogtun
Mar 13, 2018 22:41
Forum: Beginners
Topic: "date" returns wrong format
Replies: 8
Views: 1798

Re: "date" returns wrong format

The documentation shows the output is in the format mm-dd-yyyy DATE DOCUMENTATION Returns the current system date as a string Syntax Declare Function Date ( ) As String Usage result = Date Return Value Returns the current system date, in the format mm-dd-yyyy So the right thing to do would be to ch...
by skogtun
Mar 13, 2018 16:46
Forum: Beginners
Topic: "date" returns wrong format
Replies: 8
Views: 1798

"date" returns wrong format

I tried this yesterday. FreeBASIC gives an ambiguous result: $ echo print date >datetest.bas $ fbc datetest $ ./datetest 03-12-2018 Is this 3. December or 12. March? Only Americans will see it as the former. Same bug in the macro __DATE__, so "fbc --version" shows a wrong (or at least ambi...
by skogtun
Dec 15, 2017 15:21
Forum: General
Topic: Extremely slow PRINT statement
Replies: 16
Views: 2386

Re: Extremely slow PRINT statement

Also, if I use xterm, instead of the standard Ubuntu terminal, it is almost instantaneous, too. I would suggest sancho3 to try the same: run it under xterm. If it is fast enough, it would mean that the issue is in the Ubuntu terminal emulator, not in FreeBasic. You are right, it runs as expected un...
by skogtun
Dec 15, 2017 15:20
Forum: General
Topic: Extremely slow PRINT statement
Replies: 16
Views: 2386

Re: Extremely slow PRINT statement

dodicat wrote: skogtun must have a 32 bit OS (Brandy basic is a 16 bit)
Unless of course he/she has re-compiled the C source.
(Brandy basic is a simulation of BBC basic, but is a free interpreter.)
64-bit Devuan Linux. Yes, I have compiled the Brandy interpreter myself.
by skogtun
Dec 15, 2017 15:17
Forum: General
Topic: Extremely slow PRINT statement
Replies: 16
Views: 2386

Re: Extremely slow PRINT statement

St_W wrote:It takes about 0.04 second to execute on my system, so not slow.

Please post the code that you used to compile. The one you posted clearly doesn't (as it contains line numbers).
Of course it compiles with line numbers and "-lang qb". It's a test program from the eighties.
by skogtun
Dec 14, 2017 18:28
Forum: General
Topic: Extremely slow PRINT statement
Replies: 16
Views: 2386

Extremely slow PRINT statement

The following simple program: 110 R = 10 120 K = 1.6 130 R2 = R^2 140 PRINT "AREA =";3.14159*R2,"CIRCUM =";2*3.14159*R 150 PRINT 160 PRINT 170 K1 = K*R 180 FOR X = -R TO R + 0.1 190 Y = K*SQR(R2 - X^2) 200 PRINT TAB(2.5 + K1 - Y);"*";TAB(5.5 + K1 + Y);"*" 210 ...
by skogtun
Aug 17, 2017 21:41
Forum: Community Discussion
Topic: Replace __DATE__ with __DATE_ISO:__
Replies: 5
Views: 1219

Replace __DATE__ with __DATE_ISO:__

src/sompiler/fb.bi:

const FB_BUILD_DATE = __DATE__

This is ambiguous. None but Americans use the date format MM/DD/YY.

Replace with

const FB_BUILD_DATE = __DATE_ISO__

and everyone should be happy.
by skogtun
Jul 05, 2016 12:40
Forum: Community Discussion
Topic: FreeBASIC for FreeBSD
Replies: 3
Views: 1965

FreeBASIC for FreeBSD

FreeBASIC compiled on FreeBSD 10.3 (x86_64). Passes all my tests, e.g. compiles itself.

<https://drive.google.com/open?id=0BySA9 ... 1REOWlhem8>