This is an area where many people have done a lot of work, but it requires an intimate knowledge of a number of things. First of all, a knowledge of pointers in C++ only partially helps, because memory addresses in QuickBASIC are segmented (read this FAQ for more information: faq314-290...
Here's the approach I take, by the way. It is conceptually a bit cleaner than repeatedly adding to a string.
padded$ = RIGHT$("000000" + LTRIM$(STR$(number%)), 7)
Of course this only works with positive numbers.
Here is some information on the QuickSort, in case anybody is still a bit confused:
faq314-336 "What is the Quick Sort, and how fast is it, really?"
Hehe, you were told to avoid 2000? Whoever recommended that to you was misinformed :-) Windows 2000 is the most stable of the mainstream Windows line yet released. It lacks a few of the features of XP, but in part that is what actually makes it stable. Also, 2000 is faster than XP -- in some...
SEWill, I think what you need to see is that SUBs automatically return to the place from which they were called, as soon as QB reaches the end of the subroutine. Here is a simple example:
DECLARE SUB test ()
PRINT "a"
test
PRINT "c"
SUB test
PRINT "b"
END SUB...
mgh730,
What you need to do is wrap up the routines to draw the mouse cursor inside SUBs. Then, you can maintain two versions of the cursor, one in PUT format and one in a simple array that's easy for you to access (or you could even figure out how to read it directly from the PUT array -- in...
A conceptually easier way to make a maze is to maintain a list in addition to the maze being made: a list of all squares that are not currently in the maze but which are ADJACENT to the maze.
Think of it this way: the maze is originally empty and you have a grid full of squares that are not...
But because it's not object-oriented, it doesn't run itself. You can't just add a bunch of controls to a form. You can't just ask an object to draw itself. Building up forms dynamically is difficult and requires container structures outside of the parent object, etc. It is my belief that any...
PEEK and POKE are for accessing memory directly. On very old systems, like the VIC20, TRS-80, Z80, etc., hardware access was achieved by accessing memory at special locations. The memory access would then be intercepted and translated into a hardware command. This is still done to a much more...
Mode X is a slang name for a VGA hack that achieves 320x240 in 8-bit colour with square pixels. I recommend you read up on it in Michael Abrash's Black Book, he explains all the VGA options very well. It's a much more difficult mode to work with compared with mode 13h (SCREEN 13), though...
An NT class Windows will not crash at all, and in all likelihood if you misplace a pointer while running under Windows 9x, you will simply crash another program that is running. You could also crash the system, but it would not be permanent (you could just reboot). The chance of actually...
The preferred method for calling assembler functions from QB is to make a separate assembler module, assemble it to its own OBJ file using an assembler like MASM or TASM, then link the OBJ file into the project. You can then use a DECLARE statement to specify parameters, calling convention and...
The following thread revisited a previous question I answered a long time ago in the QBasic programming forum:
thread314-395032
The issue at hand is reading (and possibly writing) the memory of a process given only its process ID. I asked around when the question was originally asked and was...
I know all about it, actually I've read Abrash's Black Book, but QB can't properly take advantage of most of those tricks. Anyway, as far as I am concerned, the art of realtime graphics is somewhat lost now that we have 3D accelerators to take care of it for us. Not that it's trivial to do with...
I know all about it, actually I've read Abrash's Black Book, but QB can't properly take advantage of most of those tricks. Anyway, as far as I am concerned, the art of realtime graphics is somewhat lost now that we have 3D accelerators to take care of it for us. Not that it's trivial to do with...
It's important to decouple renderer from graphic display program. I know people who have written complex raytracing programs which can handle arbitrary image sizes and pixel bit depths, and they got around the display mode problem by simply not displaying the result. Instead, they dump it to a...
agual, as far as I understand it, he doesn't want the scientific notation. He wants to see 0.00000000000000001 instead of 1D-16. However, your suggestion of using PRINT USING can still be applied, if he's using PRINT to display the values. I provided a more generic solution since he was simply...
Here's a little hack job I did back in my BBSing years. I assume it works. It seems similar to one of the examples already posted. If this code does not work, then your modem may not be following the RS232 specification correctly.
DECLARE SUB prunt (a$)
OPEN "COM4:" FOR RANDOM AS #1...
This should in theory not differ from talking to a regular line modem. As long as the wireless modem is connected to one of the standard COM ports, you can access the modem using PRINT and LINE INPUT. The following statement should allow you to access the modem if it is on COM1 with no parity, 8...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.