Questions tagged [freebasic]

FreeBASIC is a free/open source (the compiler is GPL and the runtime library is LGPL with static linking exception), 32-bit & 64-bit BASIC compiler for Microsoft Windows and LInux and a 32-bit compiler for protected-mode extended DOS.

FreeBASIC is a high-level programming language supporting procedural, object-oriented and meta-programming paradigms, with a syntax compatible to Microsoft QuickBASIC. The FreeBASIC project originally began as an attempt to create a code-compatible, free alternative to Microsoft QuickBASIC.

The compiler, fbc, currently supports building for i386-based architectures on the protected-mode extended DOS, Linux, Windows and Xbox platforms. The project also contains thin bindings (header files) to some popular 3rd party libraries such as the C runtime library, Allegro, SDL, OpenGL, GTK+, the Windows API and many others, as well as example programs for many of these libraries.

On Wikipedia: http://en.wikipedia.org/wiki/FreeBASIC

44 questions
7
votes
4 answers

How can I convert QBASIC PLAY Commands to Something More Contemporary?

I have play commands in my QB application like this: PLAY "MSe8f#4f#8f#8g8a8b4.a4.g4.f#4.o0b8o1e8e8e4d8e2." I'd like to convert these somehow into something modern applications could use. Any thoughts? I'm currently messing around with the…
Dave Mackey
  • 4,306
  • 21
  • 78
  • 136
3
votes
0 answers

Nothing showing in window FBTilengine

I’ve been trying to prototype my game in FBTilengine, I copied the examples for rendering the background layers like here: repo However my background layers do not show in the window. The project compiles with no errors and the samples work fine,…
3
votes
4 answers

qbasic how to pass array and variables to a function/subroutine?

How can I pass the deck(52) array from the Newgame function to the deckshuffle function FUNCTION newgame 'New game RANDOMIZE TIMER CALL cardsuit 'heart$ = CHR$(3): diamond$ = CHR$(4): club$ = CHR$(5): spade$ = CHR$(6) quitgame = 0 …
2
votes
3 answers

PeekInt, PokeInt, Peek, Poke equivalent in C from BASIC

I was wondering what is the equivalent of the command Peek and Poke (Basic and other variants) in C. Something like PeekInt, PokeInt (integer). Something that deals with memory banks, I know in C there are lots of ways to do this and I am trying to…
2
votes
1 answer

MySQL Access Read in FreeBASIC

I have a problem developing this example code. This code would help to understand how communication with a MySQL server works in FreeBASIC, Currently I have been able to find some examples in C but I don't understand how to adapt everything in…
Sever
  • 47
  • 3
2
votes
1 answer

FREEBASIC Open COMn: problems or limitations

Trying to read data from a COMn: port using FreeBasic. The device is a TouchScreen with an ARM controller that punch serial data at 9600,N,8,1 via a FTDI chip to connect USB to PCs. This motherboard I am using for test has native COM1 on BIOS, and…
2
votes
1 answer

I have some problem when I make a class type in freeBASIC

reading on the internet we refer to FreeBASIC as an object-oriented language, where it is possible to create primitive classes and use them as real objects, I've seen some examples but I can't understand how they work also because when I go to…
Sever
  • 47
  • 3
2
votes
2 answers

Get/set cursor position in BASIC

I know BASIC is a deprecated language but it's fun to play around with. I'm using FreeBASIC on Windows and I'm trying to re-compile an old program that I originally wrote for the Apple ][. One instruction that no longer works is HOME, which…
MD XF
  • 7,860
  • 7
  • 40
  • 71
1
vote
4 answers

Converting a program from FreeBASIC to Python: globalizing variables

In a previous post, I was told I am coding in Python like you would in BASIC (I am not "thinking" in Python yet). This is probably true and this is why I need help. This being said, I have read one book about Python so far (Bytes of Python), I…
erlang
  • 27
  • 1
  • 3
1
vote
2 answers

BASIC to Python program

I have created a small program to see if I'm as proficient in Python as I am in FreeBasic (and I'm not that good with FreeBasic). Obviously, I'm asking this question because the answer is no. So the this program is a small Dungeons and Dragons (2nd…
erlang
  • 27
  • 1
  • 3
1
vote
1 answer

FreeBASIC and GTK Glade how work the glade Button?

a few months ago I started programming with FreeBASIC using the GTK libraries so that the applications are operational on both Windows and Linux without the need to rewrite the code, but being a beginner I only managed to create the mask but I don't…
Graziano
  • 13
  • 2
1
vote
2 answers

Call a Function from another bas file in FreeBASIC

how do i call a function where it is declared in another bas file? For example i have 2 bas files. sum.bas Declare Function sum( As Integer, As Integer ) As Integer Function sum( a As Integer, b As Integer ) As Integer Return a + b End…
demosthenes
  • 1,151
  • 1
  • 13
  • 17
1
vote
2 answers

Array Not Dimensioned Before

I have the following QuickBasic 4.5 code: IF LEN(Dir$("mtn.vga")) > 0 THEN BLOAD "mtn.vga", VARPTR(mtn(1)) I'm trying to port it to FreeBasic but receive the error: Array not dimensioned, before '(' IF LEN(Dir("mtn.vga")) > 0 THEN ^ Any…
Dave Mackey
  • 4,306
  • 21
  • 78
  • 136
1
vote
2 answers

How do I allow data requested by a user to be printed using arrays in free-BASIC?

For this problem I need to have the user input a number and in return receive the Name, current salary and new salary of the teacher. I've tried something like this Dim Names(10)as String Dim Yos(10) as Integer Dim Sal(10) as Integer Dim Nsal(10) as…
Alysia56
  • 11
  • 2
1
vote
0 answers

Can we use Facebook/ twitter/ linkedin login while website is hosted on internet.org

Is there any hack to support third party login to the website? Currently It is giving error like "Standard Data Charges You're leaving Free Basics. :// is not a free website and standard data charges will apply."
Rashmi Jain
  • 1,385
  • 12
  • 18
1
2 3