Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 3,103
» Latest member: arunganta
» Forum threads: 10,309
» Forum posts: 57,120

Full Statistics

Online Users
There are currently 217 online users.
» 0 Member(s) | 216 Guest(s)
Bing

Latest Threads
Oldies still around?
Forum: General/Misc
Last Post: Antoni Gual
03-20-2022, 08:42 PM
» Replies: 103
» Views: 97,968
RecroCoders Community - a...
Forum: FB Discussion & Programming Help
Last Post: ron77
02-26-2022, 03:12 PM
» Replies: 0
» Views: 881
New version of my DOS GUI...
Forum: QB Projects
Last Post: The walrus
01-07-2022, 08:41 PM
» Replies: 0
» Views: 1,189
Project looking for Progr...
Forum: QB Discussion & Programming Help
Last Post: Daniel3D
09-20-2021, 02:45 PM
» Replies: 0
» Views: 1,010
Old bespoke - No Source!
Forum: QB Discussion & Programming Help
Last Post: jofers_
04-22-2021, 05:27 PM
» Replies: 1
» Views: 1,669
What Type Of Information ...
Forum: QB Discussion & Programming Help
Last Post: sophiajones0
03-06-2021, 02:41 PM
» Replies: 0
» Views: 1,195
Neglect to activate Cash ...
Forum: QB Discussion & Programming Help
Last Post: sophiajones0
03-06-2021, 02:40 PM
» Replies: 0
» Views: 1,139
Cursor avec typewriter ef...
Forum: QB Discussion & Programming Help
Last Post: jofers_
01-21-2021, 05:20 PM
» Replies: 1
» Views: 1,651
Can I use labels in SUBs
Forum: QB Discussion & Programming Help
Last Post: jofers_
08-11-2020, 01:12 PM
» Replies: 1
» Views: 1,894
Old forum still viewable
Forum: Site/Forum Issues
Last Post: Kitto
07-06-2020, 03:23 PM
» Replies: 5
» Views: 18,962

 
  'Program to generate "sentences" random
Posted by: lrcvs - 08-20-2009, 08:36 PM - Forum: General Programming - No Replies

'Program to generate "sentences" random
'lrcvs 20.08.09

'Possible uses:
'to sort files
'fill arrays....


CLS
FOR h = 1 TO 10 'Number of sentences
l = 10 'Number of words
j = 0
WHILE j < l
z$ = ""
RANDOMIZE TIMER
a = INT(RND * 100)
IF a > 64 THEN b = a
IF b < 91 THEN c = b
IF a > 64 AND b < 91 THEN z$ = CHR$(b): y$ = z$
FOR n = 1 TO 10
RANDOMIZE TIMER
a = INT(RND * 100)
IF a > 64 THEN b = a
IF b < 91 THEN c = b
IF a > 64 AND b < 91 THEN z$ = z$ + CHR$(b)
NEXT n
k$ = k$ + z$ + " "
j = j + 1
IF LEFT$(k$, 1) = " " THEN MID$(k$, 1) = y$
WEND
PRINT k$
k$ = ""
NEXT h
END


Print this item

  Multiplication Table
Posted by: lrcvs - 08-08-2009, 02:17 AM - Forum: General Programming - No Replies

CLS
FOR x = 0 TO 10
FOR y = 0 TO x
p$ = p$ + STR$(x * y) + " "
NEXT y
IF x < 10 THEN PRINT USING "##"; y - 1; : PRINT " "; p$; : PRINT USING "##"; y
IF x = 10 THEN PRINT USING "##"; y - 1; : PRINT " "; p$
p$ = ""
NEXT x
END

Multiplication table.

Read to rigth, after, to down, until end

0  0
1  0 1
2  0 2 4
3  0 3 6 9
4  0 4 8 12 16
5  0 5 10 15 20 25
6  0 6 12 18 24 30 36
7  0 7 14 21 28 35 42 49
8  0 8 16 24 32 40 48 56 64
9  0 9 18 27 36 45 54 63 72 81
10  0 10 20 30 40 50 60 70 80 90 100




Print this item

  BLoad Has a VB Form around It
Posted by: Zooker - 08-06-2009, 03:08 AM - Forum: FB Discussion & Programming Help - Replies (3)

Below is almost a Carbon Copy of my screen
|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>|
FBIdeTemp              (This is the Dark Blue Banner across top of crn)      |
|<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<|
|                                                                                                       
|  *                      *                      *                    *                    *        |
|                                                                                                          |*          * *            *                      ***          **            *        *    |
|
|                                Blue Stars on Black Bacground_
|                                                                              \
|    *              *              **              *          **          *              *
|
|
|**      *        *      *            **            *          ***          *          **
|
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>|  19"  diagonal Full screen
How do I get rid of the Blue Banner with FBIdeTemp in it and Blue Line down Left side?
Pressing Print Screen Alt or just Print screen does Nothing. Leaving The file Name out of the BELOAD and Just BLOAD and running it shows everything the same without the stars. Some one must of had this happen to them?

Print this item

  Print 000 As Numerical Variable
Posted by: Licentia - 07-30-2009, 12:36 PM - Forum: QB Discussion & Programming Help - Replies (12)

Hello!

I know that I can print 001 as a "$tring Variable." But I want to print 001 as a "Numerical Variable." Any suggestions how I might do this?

Licentia

Print this item

  freefile to make appendable a random file?
Posted by: guyisland - 07-10-2009, 02:31 AM - Forum: QB Discussion & Programming Help - Replies (4)

hy, i am trying to make a small database to practice, but i like to save a record in a file. for adding more file in the next time to open. my situation is that i used the free file to start in the next free record when add more record , but the new record delete the old record, not entire the file.

Code:
CLS
TYPE namestype
     nm AS STRING * 10
     ln AS STRING * 10
     age AS INTEGER
END TYPE
DIM names AS namestype
DIM fh AS INTEGER
fh = FREEFILE
recordlen# = LEN(names)
OPEN "stubase.dat" FOR RANDOM AS #fh LEN = recordlen#
5
INPUT "name: ", names.nm
INPUT "last name: ", names.ln
INPUT "age:", names.age
PUT #fh, , names
INPUT "any more data?", more$
       IF more$ = "y" GOTO 5 ELSE
CLOSE #fh
END

was is the best approach to make a file appendable and situable for a database, to editable the file and also, add more record.
thanks in advanced.

Print this item

  QB64 V0.84 released (Windows only)
Posted by: Dav - 07-06-2009, 06:09 PM - Forum: QB/FB News - Replies (4)

The QB64 compiler project updates once again by releasing QB64 V0.84.  This is a major update as it fixes a critical IDE memory issue, several bugs, and adds even more Qbasic compatibility.  This is a Windows only release.  The next Linux version is not expected utill the V0.841 update planned 3 weeks from now. 

QB64 is currently a one-man project, by Galleon, aimed at making a Qbasic compatible compiler that will produce EXE's which will run perfectly on modern computers.  It comes with a 'Classic' IDE, made in QB64, that looks and feels close to Qbasic. Most of Qbasic commands are now fully supported, making QB64 perhaps the most Qbasic compatible compiler there is.  Even the well-known Qbasic game 'Wetspot' compiles, and is included in the QB64 samples folder.  The next QB64 release is said to add support for the DRAW command, which in my opinion is the last major hurdle for QB64 to become a truly Qbasic compatible compiler.

In addition to Qbasic compatiability, this QB64 V0.84 adds commands to allow the programmer to specify an ICON and the window title bar text for their programs.

For more information and a download link check out Galleons official QB64 release post at the QB64 project fourm:
http://www.qb64.net/forum/index.php?topic=311

On a side note, one of the QB64 forum members is working on a DirectQB to QB64 translator to allow games made with the DirectQB library to be compiled with QB64.

Here is part of the QB64 Readme.txt concerning this release:

Quote:Stability & QBASIC compatibility have been significantly improved. Many problems not listed here have also been addressed.

New commands specific to QB64:
_ICON imagehandle 'changes the program's icon
_TITLE string$ 'changes the text in the title bar
_DELAY x 'waits for x seconds (accurate to nearest millisecond), relinquishing cpu cycles to other applications
_LIMIT x 'limits the fps/rate of a program to x loops/frames/etc per second, relinquishing any spare cpu cycles to other applications
t=TIMER(0.001) 'returns TIMER value rounded to nearest 0.001 of a second (highest accuracy possible is to the nearest millisecond)
_DISPLAY (no parameters) 'This command manually updates the monitor using the data of the currently selected display page. The command also disables the autodisplay of display page data to the monitor (the default) if it is on.
_AUTODISPLAY (no parameters) 'This command enables autodisplay so the display page data will automatically be updated to the monitor.
x=_ERRORLINE 'Returns the source code line number that caused the most recent runtime error

Added support for QBASIC commands:
CALL INTERRUPT
CLEAR
COMMON (when used in programs without multiple modules)
RUN

Other improvements:
-Severe memory leaks fixed
-can PEEK timer bytes at &H46C-E (46c+46d*256+46e*65536)
-division error fixed [(tx<2)/2.0 VS print (tx<2)/2]
-INP(&H3C9) for palette reading
-power-of [^] bug (related to order of operations)
-Reading "" in DATA statements
-Many fixes/improvements to referencing/allocating variables (including user defined types) in conventional memory
-SUBs/FUNCTIONs requiring variables in comventional-memory now supported
-Problems calling CALL ABSOLUTE addressed

IDE improvements:
-Severe memory leak which affected the IDE fixed
-Uses 50% less memory (RAM)
-Minimal CPU usage
-Many freeze/crash related problems addressed

- Dav

Print this item

  User chooses which file to open
Posted by: Licentia - 07-03-2009, 08:20 AM - Forum: QB Discussion & Programming Help - Replies (4)

Hello!

(NOTE: If this isn't possible to do please someone post and let me know so I don't wait forever. Thanks so much!)

Sorry I am sure this should be an easy answer but I am Googling to no avail. Instead of the normal command:

OPEN "FILE.TXT" FOR INPUT AS #1

I want to be able to have the user choose which file to open. I think this is possible and I have probably done it in the past, but I haven't done much programming for several years now. The consequence is I have forgotten how.

Any help would be appreciated!

Licentia

Print this item

  Oldies still around?
Posted by: Diroga - 06-17-2009, 11:54 AM - Forum: General/Misc - Replies (103)

Wow this place still exists! I'm just poking around my old places. I haven't been here is well over 4 years. It's good to see that QB is still active. I haven't used it in years and probably won't use QB and might do some FB for basic game ideas.

Are there any other Oldies around from the 2001 to 2005 era? like whitetigger and who ever? I guess we all grew up and moved on.

Print this item

  Problem with IF...THEN...ELSEIF + DO ... LOOP + WHILE ... WEND
Posted by: Karelius - 06-15-2009, 04:58 PM - Forum: QB Discussion & Programming Help - Replies (4)

Hi! I've a problem with this code:

Code:
Sessione = TRUE
WHILE Sessione

'Barra di stato
Future.FillBox 2, Lx - 19, Rx - 2, Lx - 2, RGB2Color&(0, 0, 32)
Future.Box 1, Lx - 20, Rx - 1, Lx - 1, RGB2Color&(0, 128, 192)

'Barra del menu
Future.FillBox 2, Lx - 49, Rx - 2, Lx - 21, RGB2Color&(0, 24, 64)
Future.Box 1, Lx - 50, Rx - 1, Lx - 20, RGB2Color&(0, 128, 192)

Future.LoadBMP "\hawk\skin\" + skin$ + "\user.bmp", 5, Lx - 47

TIMER ON
ON TIMER(1) GOSUB Stato

Future.MouseOn

DO
        Future.UpdateMouse
        IF Future.MouseX% > 5 AND Future.MouseX% < 29 AND Future.MouseY% > Lx - 47 AND Future.MouseY% < Lx - 23 AND Future.MouseB% = 0 THEN
                Future.Print 5, Lx - 18, "Amministra il sistema", RGB2Color&(255, 255, 255), -1
        ELSEIF Future.MouseX% > 5 AND Future.MouseX% < 29 AND Future.MouseY% > Lx - 47 AND Future.MouseY% < Lx - 23 AND Future.MouseB% = 1 THEN
                Future.MouseOff
                Future.FillBox 33, Lx - 49, Rx - 2, Lx - 21, RGB2Color&(0, 52, 92)
                Future.Box 32, Lx - 50, Rx - 1, Lx - 20, RGB2Color&(0, 128, 192)
                Future.LoadBMP "\hawk\skin\" + skin$ + "\update.bmp", 37, Lx - 47
                Future.LoadBMP "\hawk\skin\" + skin$ + "\esci.bmp", 65, Lx - 47
                Future.MouseOn
                DO
                        Future.UpdateMouse
                        IF Future.MouseX% > 37 AND Future.MouseX% < 61 AND Future.MouseL% > Lx - 47 AND Future.MouseY% < Lx - 23 AND Future.MouseB% = 0 THEN
                                Future.Print 5, Lx - 18, "Visualizza info aggiornamenti", RGB2Color&(255, 255, 255), -1
                        ELSEIF Future.MouseX% > 37 AND Future.MouseX% < 61 AND Future.MouseL% > Lx - 47 AND Future.MouseY% < Lx - 23 AND Future.MouseB% = 1 THEN
                                END
                        ELSEIF Future.MouseX% > 65 AND Future.MouseX% < 89 AND Future.MouseL% > Lx - 47 AND Future.MouseY% < Lx - 23 AND Future.MouseB% = 0 THEN
                                Future.Print 5, Lx - 18, "Esci da Hawk", RGB2Color&(255, 255, 255), -1
                        ELSEIF Future.MouseX% > 65 AND Future.MouseX% < 89 AND Future.MouseL% > Lx - 47 AND Future.MouseY% < Lx - 23 AND Future.MouseB% = 1 THEN
                                END
                        END IF
                LOOP WHILE INKEY$=""
        END IF
       
LOOP WHILE INKEY$ = ""
Sessione = FALSE
Future.MouseOff
WEND

in the second DO...LOOP, the "if...then...elseif" don't work!!! Why?

Print this item

  Converting excel to qbasic
Posted by: DJTREKBIKER - 06-04-2009, 12:32 AM - Forum: QB Discussion & Programming Help - Replies (2)

Hi All
I have been causually trying to convert excel spreadsheets to qbasic .dat files for some time now and have had no luck.  I can convert a qbasic .dat files to excel but can't figure out how to get them back again.
Can anyone help with this?
Dan

Print this item