Search found 10 matches

by skogtun
Mar 14, 2018 13:27
Forum: Beginners
Topic: "date" returns wrong format
Replies: 8
Views: 566

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: 566

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: 566

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: 566

"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: 660

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: 660

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: 660

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: 660

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: 588

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: Projects
Topic: FreeBASIC for FreeBSD
Replies: 3
Views: 897

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=0BySA9klWlGFLY1ZEZ1REOWlhem8>

Go to advanced search