Questions tagged [qbasic]
QBasic is a general-purpose interpreted programming language derived from QuickBasic 4.5. QBasic replaced GWBasic starting from MSDOS 5. It became popular, because it had a quite advanced IDE with a debugger and was delivered free with MSDOS, Windows 95 and 98. The well-known game 'Nibbles' was written in QBasic. QBasic was written by Paul Allen (Microsoft) in 1991. Also see [tag:quickbasic]
qbasic
182
questions
-1
votes
0
answers
31
views
Trying to make a replica of the QBasic Gorilla game in C# Windows Forms. How to make the cube in the designer (banana) move with ballistics?
using System.Numerics;
using System.Reflection;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace gorilla
{
public partial class Form1 : Form
{
private ...
0
votes
0
answers
24
views
How do i write the function tjCompress2 from the dynamic library libturbojpeg in qb64 so i can compress a 32 or 24 bits image into a jpeg in a buffer?
I want to use libturbojpeg to make jpegs in qb64 and i don't know how to write the functions. Can someone help me?
Declare Dynamic Library "libturbojpeg"
Function tjInitCompress ()
...
1
vote
1
answer
42
views
QuickBasic optional arguments
Is it possible to write a subroutine or function with optional arguments?
for example:
MyFunct (x AS INTEGER, [y AS INTEGER, Z AS INTEGER])
so that I can use the function with only the first argument ...
0
votes
0
answers
84
views
quickBasic WINDOW statement
I found this old book and in the appendix there are some QuickBasic programs that I want to try out.. the problem is that those were written on/for Apple Macintosh II and I use DosBox on a Linux PC.. ...
0
votes
1
answer
57
views
QBasic in Dosbox : MS-DOS interrupt says there's no mouse
I'm using QBASIC version QB45
I'm using the classic code snippet to get the state of the mouse, through a system interrupt :
STATIC Regs as RegType
Regs.ax = &H0
CALL INTERRUPT(&H33, Regs, ...
0
votes
1
answer
41
views
Issue running program in DOS 5.02
We are trying to run certain .exe programs on a IBM 486 running DOS 5.02 to make sure
they are backwards compatible. When attempting to compile an QBasic 4.5 program with BC.EXE
we get the following ...
-3
votes
1
answer
43
views
Function expected ) on tic tac toe game
iam making a tic tac toe on QBasic but I have a problem with a function and i don't know fix it
The error is "Expected ) on current line" but i don't know where put )
FUNCTION HayGanador() ...
1
vote
1
answer
63
views
Im trying to make tetris in Basic , but I have encoutered a problem which i cant seem to solve
' Define the subroutine
SUB MySubroutine
PRINT "Hello, world!"
END SUB
' Call the subroutine
CALL MySubroutine
I wanted to try and make TetrisTetris in qbasic but I'm trying to figure ...
3
votes
1
answer
103
views
Inconsistent REDIM behaviour in QuickBasic 4.5
I was writing a toy QBasic compiler and some tests for it. When I tried to create a vector type, I encountered an inconsistency with REDIM.
The following code works in both QBasic and QuickBasic 4.5 ...
0
votes
1
answer
75
views
Number required for function error in qb64
I am writing a qb64 / QBasic software program to convert a numerical grade 0-100 to a letter grade (a,b,c,d,f). I have set it up so that strings/arrays are used to allow infinite grades to be entered. ...
0
votes
0
answers
125
views
Event listener not updating variable in while loop
I'm currently working on a project where I'm trying to run some QBasic code on a webpage. I transpiled it to JavaScript and I wrote some helper functions to replace functions in QBasic. Specifically,...
0
votes
1
answer
151
views
QBASIC program is returning an 'inf' output
I'm starting to learn QBASIC for while, but the first test is something I can't understand fully...
There is a part about the y variable which is returning "inf" and I can't understand WHY.....
2
votes
3
answers
889
views
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 ...
-3
votes
1
answer
60
views
How to transfer loop from qBasic to JS?
I tried to move code from qBasic to JS but after moving I got incorrect result (infinite loop or incorrect numbers). Can you help me to find where is mistake. I think mistake on loop condition.
qBasic
...
1
vote
1
answer
237
views
Set cursor in QB45
I have been using the following code to change the cursor in QB45:
SUB LocateX(Inserting)
' locate cursor
IF Inserting THEN
' half-block cursor
Locate Xcoor, Ycoor, 1, 3, 7
...