181 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
2
answers
109
views
Qbasic do until loop statement
Today I saw an indefinite looping with garbage values in do until loop of qbasic. My program was simple- to print numbers from 1 to 100. When I used increment as x=x+1 or x=x+3 it showed proper output....
1
vote
1
answer
98
views
BASIC "Statement cannot be placed between SUB FUNCTIONS"
I'm trying to make a simple game with BASIC in QB64.
I'm used to programming C# and I can't get the simples thing working:
test 1.bas:
REM $INCLUDE: 'test2.bas'
Hey
test2.bas:
SUB Hey
PRINT &...
1
vote
1
answer
70
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 ...
1
vote
1
answer
129
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
55
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
58
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
128
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
160
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
98
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
138
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
206
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
2k
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
65
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
328
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
...
2
votes
1
answer
627
views
Main Menu made in QBasic (QB64)?
I've made this menu a long time ago, but I found the file about 2 days ago and I wanted to make it work
CLS
FOR k = 10 TO 65
LOCATE 2, k: PRINT CHR$(222)
LOCATE 23, k: PRINT CHR$(222)
...