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
1
vote
1 answer

How can I get the current filename in a FreeBasic DLL?

How can make a FreeBASIC DLL find its own filename and path? I've tried this so far: (ran it with rundll32 filename,DllMain) Code: #include "windows.bi" Extern "Windows-MS" Sub DllMain() Export dim This as String This = dir(command$(0)) …
user5946522
1
vote
1 answer

How to add a new language (compiler) to G-WAN?

Is it possible (and if yes, how) to add new compiled languages to G-WAN such as Free Basic (fbc) and Basic 4 QT (Q7BCompiler) which both provide complete IDE and build Linux executables? TIA.
Fnux
  • 416
  • 1
  • 4
  • 9
1
vote
0 answers

Internet.Org participation of website

https://developers.facebook.com/docs/internet-org/platform-technical-guidelines I have read this link and understood what internet. Org requires for a website to be eligible for free. Now I have a website which is content heavy and DON'T Meet any of…
1
vote
1 answer

Coloured Text in gui FreeBasic

Ive made a GUI but would like to change the text color for this line. I have tired to search but all I can find is changing colors for print output. warn1 = CreateWindowEx( 0, "STATIC", "", WS_VISIBLE Or WS_CHILD, 20, 150, 300, 40, hWnd, 0, 0, 0…
shaggs
  • 600
  • 7
  • 27
1
vote
4 answers

IsFile, IsDirectory Test Windows

I'm trying to convert a program from Linux to use on Windows, and it calls test -f, or test -d on Linux. I need it to do the same thing on Windows. Is there a built-in command, or another program I can use to do the same thing? I'm programming using…
bradlis7
  • 3,375
  • 3
  • 26
  • 34
1
vote
3 answers

C++ equivalent function with ScreenRes in FreeBasic

With FreeBasic I can create and open a new screen with a function ScreenRes. For example, #include "fbgfx.bi" ScreenRes 640, 480, 32 Sleep() will create a 640 x 480 screen with depth 32. So, is there any function in C++ that equivalent with…
Pattisahusiwa
  • 205
  • 2
  • 8
1
vote
1 answer

Freebasic Compilation Fail

I've just started learning BASIC AND using Stackoverflow. This is my code in FBIDE. The error messages are : 42 variable not declared : var1 in 'input "Enter Function Number" ;var1 / - 32 expected 'END IF' found 'end' in 'end sub'/ - 32 expected…
florosus
  • 25
  • 5
1
vote
1 answer

how can I find an available COM port in FreeBASIC?

I'm working on a graphical COM port monitor in FreeBASIC, but I feel kinda wrong re-compiling every time I change the computer or the adapter. Is there any way to scan for an available COM port in FreeBASIC?
Paul
  • 43
  • 4
0
votes
3 answers

Input array in Free Basic

Now, I'm programming by Free Basic and I'm looking for a way to get values of an array in a single line. For example, if I want to get 2 integers of an array in a single line, I write this: Dim a(2) as integer Input a(1),a(2) But my program should…
Mostafa Farzán
  • 899
  • 2
  • 11
  • 30
0
votes
1 answer

How to break an integer into single bytes and merge them again in FreeBASIC?

I'm making a simple steganography program to hide data in PNG files. Decoding/encoding single bytes was easy, but I also need to hide a header in the PNG file. This header will contain the filesize in bytes to know exactly how many bytes I need to…
Dariusz G. Jagielski
  • 655
  • 3
  • 11
  • 22
0
votes
0 answers

What is the data type of characters ie. "!", "+" in FreeBASIC?

I tried char and vargchar, but none of them work. i want to build a calculator and want to ask the user what symbol they want to use like +,- i tried doing char and vargchar, but none of them work. using fbide
Coop Good
  • 11
  • 4
0
votes
1 answer

What is the reason of an error "Array access, index expected"

I get an error 73 "Array access..." with code: #include "args.bas" Dim aargs(1) As Args.Arg Dim args_num As Integer = 0 args_num = Args.ParseArgs(aargs) 'error 73: Array access, index expected, before ')' in 'args_num =…
RandomB
  • 3,367
  • 19
  • 30
0
votes
1 answer

What does "call ___main" do?

When I compile Fortran or FreeBASIC code into assembly, the instruction call ___main is found in the assembly code generated by the compiler. However, when I use cl.exe to compile C++ code, this instruction is not generated by the compiler. Both…
0
votes
1 answer

Are I/O statements in FreeBasic compiled as function calls?

Example: Dim x As Integer, y As Integer Input "x=", x y = x ^ 3 + 3 * x ^ 2 - 24 * x + 30 Print y End When I used FreeBasic compiler to generate the assembly code of this source code, I found .globl _main _main: and call ___main in assembly code.…
0
votes
1 answer

FreeBASIC GTK_TEXT_VIEW Example

Im New here and with no Idea of how do. I Done many programs in VB.NET but only for Windows at moment I need to work in Linux too and the alternative is FreeBASIC and GTK for GUI. Can someone make an example of How Use GTKTextView in FreeBASIC…
Sever
  • 47
  • 3