Interpretation

Windows specific questions.
Post Reply
JaydenSS
Posts: 2
Joined: Mar 06, 2024 0:43

Interpretation

Post by JaydenSS »

Is there a way to use freeBASIC as an interpreter? I hate manual compilation and was wondering if there was an option to automatically compile or maybe interpret freeBASIC.





Ok cool bye
mindlord
Posts: 24
Joined: Jul 18, 2020 19:59

Re: Interpretation

Post by mindlord »

What you need is an editor that supports external commands.
There exists Integrated Development Environment (IDEs) for both Windows and Linux.
viewtopic.php?t=28347/ <- big list of editors specific to FreeBASIC

You can also use other common tools like Visual Studio Code, Geany, or even Notepad++, you just have to set up the compile options so that you can hit F5 or whatever to compile and run the open file.
JaydenSS
Posts: 2
Joined: Mar 06, 2024 0:43

Cool

Post by JaydenSS »

Can you post the compiler on Repl.it (AKA replit.com )?
UEZ
Posts: 988
Joined: May 05, 2017 19:59
Location: Germany

Re: Interpretation

Post by UEZ »

You can use Autoit with a similar Basic syntax, which is an interpreter and can execute the code immediately without compiling it first, which is also possible.

However, intepreter languages are significantly slower, as the code is evaluated and executed in real time.
Lothar Schirm
Posts: 438
Joined: Sep 28, 2013 15:08
Location: Germany

Re: Interpretation

Post by Lothar Schirm »

JaydenSS wrote: Mar 06, 2024 0:54 Is there a way to use freeBASIC as an interpreter? I hate manual compilation and was wondering if there was an option to automatically compile or maybe interpret freeBASIC.
If you use FBEdit, FBIde, IUP_FB_Editor or an other IDE, you can also press the "Quick Run" Button. This will create a temporary compiled file which is executed immediately, working nearly like an interpreter.
angros47
Posts: 2326
Joined: Jun 21, 2005 19:04

Re: Interpretation

Post by angros47 »

I managed to integrate a basic interpreter inside FreeBasic programs:

viewtopic.php?t=29109

But that interpreter is not FreeBasic, it is a different basic dialect
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Interpretation

Post by dodicat »

Here is a qbasic interpreter for windows.
(very like #lang "qb" in FreeBASIC)
https://apps.microsoft.com/detail/9ntmc ... n-US&gl=US
Works well on Win 11.
Lothar Schirm
Posts: 438
Joined: Sep 28, 2013 15:08
Location: Germany

Re: Interpretation

Post by Lothar Schirm »

I tested it last year. Very bad experiences. I could only run some programs which were delivered with this app, nothing else. Have a luck at the ratings!
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Interpretation

Post by dodicat »

I see what you mean Lother.
I'll get rid of it.
angros47
Posts: 2326
Joined: Jun 21, 2005 19:04

Re: Interpretation

Post by angros47 »

I remember it, it was mentioned on PetesQBSite years ago, I intervened too:

http://www.petesqbsite.com/phpBB3/viewt ... 070#p39070

It is an open source program, written in javascript (with some WASM and TypeScript). It can be downloaded for free here:

https://github.com/IshikawaMasashi/QBasic

It is not windows only, it can be used also on Linux.
It seems to be based on this old demo: http://stevehanov.ca/blog/?id=92, that hasn't been developed since 11 years, and it doesn't offer anything more: the only complete QB games that works is NIBBLES.BAS (even GORILLAS.BAS doesn't work), because it doesn't offer any graphic mode.


A similar product, much more functional, is QBjs:

https://qbjs.org/

It supports graphics mode, and some of the extensions of QB64. It is open source, too:

https://github.com/boxgaming/qbjs
Post Reply