Search found 1832 matches

by angros47
Jun 19, 2021 18:42
Forum: Tips and Tricks
Topic: Starfield with trails
Replies: 0
Views: 59

Starfield with trails

Very simple starfield effect, made using the old school trick of color cycling. Use PgUp and PgDown to set the speed. const w=800: const h=600 screenres w, h, 8 Dim pal(0 To 255) As Integer dim as single x, y, c, sx, sy, sc c=1.0 for i as integer=1 to 300 x=w/2: y=h/2 sx=(rnd()*2.0)-1.0 sy=(rnd()*2....
by angros47
Jun 19, 2021 10:46
Forum: Community Discussion
Topic: FreeBASIC 1.08.1 and 1.09.0 Development
Replies: 10
Views: 369

Re: FreeBASIC 1.08.1 and 1.09.0 Development

Speaking about GOTO, I was wondering: has anyone considered adding the computed goto? Basically, a way to get a code pointer not just from subroutines, but also from line labels. If the line label is followed by a RETURN (and it was meant to be called with GOSUB), it could be called by invoking the ...
by angros47
Jun 15, 2021 17:48
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 522
Views: 98378

Re: Where can I get a Recent-Git-Build of FreeBASIC?

I understand. Last year I tried with FLTK, and got decent results, until I encountered that bug. Actually, there was a workaround (making a dummy method in the declare), but it was better to just wait for the bug fix (in the past, most software were developed using workarounds and tricks like that: ...
by angros47
Jun 14, 2021 19:35
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 522
Views: 98378

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Great! It seems to finally work as intended. Perhaps now using some C++ libraries should be possible
by angros47
Jun 12, 2021 12:23
Forum: Community Discussion
Topic: FreeBASIC 1.08.0 Release Discussion (June 2021)
Replies: 55
Views: 2186

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

Have you seen my post about class destructor, CoderJeff?
by angros47
Jun 08, 2021 14:52
Forum: Community Discussion
Topic: FreeBASIC 1.08.0 Release Discussion (June 2021)
Replies: 55
Views: 2186

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

coderJeff wrote:Did you have class.o on the command-line twice by accident?


I have used the command

Code: Select all

../bin/fbc test.bas -l stdc++ class.o
by angros47
Jun 08, 2021 7:56
Forum: Community Discussion
Topic: FreeBASIC 1.08.0 Release Discussion (June 2021)
Replies: 55
Views: 2186

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

I am almost sure I didn't put class.o in the command line twice. I used the generic linux 64 bit version of FreeBasic (not the one tailored specifically for Ubuntu), on an Ubuntu 20 system. The rest seems to work correctly, so I don't think it depends on that. I compiled with the -lstdc++ option, of...
by angros47
Jun 07, 2021 23:43
Forum: Community Discussion
Topic: FreeBASIC 1.08.0 Release Discussion (June 2021)
Replies: 55
Views: 2186

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

I tried to compile the example of https://www.freebasic.net/forum/viewtopic.php?p=272431#p272431 With 1.08 it doesn't compile, it returns: ld: class.o: in function `base::~base()': class.cpp:(.text+0x94): multiple definition of `base::~base()'; test.o:test.c:(.text+0x0): first defined here ld: class...
by angros47
Jun 07, 2021 23:32
Forum: Community Discussion
Topic: FreeBASIC 1.08.0 Release Discussion (June 2021)
Replies: 55
Views: 2186

Re: FreeBASIC 1.08.0 Release Discussion (June 2021)

I started experimenting with the new version, and the FLTK library (with C++ interface)

Why I can't declare a virtual destructor, in a class that maps a C++ class? If I do, at the linking it states that the destructor is defined twice
by angros47
Jun 06, 2021 0:04
Forum: Community Discussion
Topic: My_basic interpreter
Replies: 24
Views: 2087

Re: My_basic interpreter

Actually, "scripting" means the purpose a language is created for. While "interpreter" means the method used by that language to work. What I would like to do is: since my_basic has already been used to create some interesting programs, like https://paladin-t.github.io/b8/ and ht...
by angros47
Jun 05, 2021 21:51
Forum: Community Discussion
Topic: My_basic interpreter
Replies: 24
Views: 2087

Re: My_basic interpreter

I was thinking to create a programming environment in FreeBasic, using My Basic as an interpreter. FreeBasic would be used to create the window, and to provide input. I wonder how should I manage the code input: one option is to make the program only able to read and execute a source code from a fil...
by angros47
May 25, 2021 15:45
Forum: General
Topic: Range only PRNG
Replies: 33
Views: 1041

Re: Range only PRNG

@jj2007 The fact is, deltarho tested it, and optimized code built by fbc+gcc was faster than assembly https://www.freebasic.net/forum/viewtopic.php?p=283050#p283050 I tried to explain why this happened. It doesn't matter which one is faster in theory, as a matter of fact, compiled code is often fast...
by angros47
May 24, 2021 22:42
Forum: General
Topic: Range only PRNG
Replies: 33
Views: 1041

Re: Range only PRNG

@angros47: the portability argument is ok, the rest is wishful thinking. A good assembly programmer can always beat a compiler. Sure, they could, but they would have to write the whole program in assembly, not just a routine. Adding only few custom ASM routines in a compiled program might make thin...
by angros47
May 24, 2021 16:50
Forum: General
Topic: Range only PRNG
Replies: 33
Views: 1041

Re: Range only PRNG

PowerBasic offers features to create a simplified ASM output, like registry variable, or simplified subroutines (like fastproc). FreeBasic, with the ASM emitter, never offered anything similar; on the other hand, GCC offers automated optimization (that can be used by FreeBasic too, with the C emitte...

Go to advanced search