Page 1 of 1

My own qbsite

Posted: Fri Jul 08, 2011 3:34 pm
by TRANERAECK
Started my own web page it is basic but it has my programs on it, rather then uploading code I will just have them available for download. I will check back from time to time but going to try and start my own forum for qbasic. I hope you check out my site:

http://www.Bagel-Basic.html


See ya.

Ill Be around.

Posted: Sun Jul 10, 2011 1:26 pm
by TRANERAECK
Can only post my info at my site. Having trouble making a valid html page do everything. Here is a random number generator I worked on it doesn't calculate real good for many randoms all at one time but for one number every so often it is pretty good.

Code: Select all

INPUT "Enter an integer for randoms limit:", VARIABLE%
'capture second hand
VALUESEC$ = MID$(TIME$, 7, 2)
VALUESCND% = VAL(VALUESEC$)
IF VALUESCND% < 25 THEN VALUESCND% = VALUESCND% + 24
ATTAINED = (((VALUESCND% * 4) + 32) / 17.63) - 5
Numbersought% = INT(ATTAINED * (VARIABLE% / 10))
PRINT Numbersought%
END
See same post no new thread. All my posts have different info. Kiyote wolf makes posts all over.

Posted: Sun Jul 10, 2011 3:16 pm
by burger2227
Kiyote's BEEN here for years! He's also a MOD so watch out!


<img src="http://www.network54.com/images/wink.gif" height="60" width="60" alt="wink.gif">

ADDED SOME to the generator

Posted: Sun Jul 10, 2011 4:12 pm
by TRANERAECK
Here is a little more to my generator sorry for the inconvienence with Kiyote as well I was sure my name means Koji Igarashi. Programmer of Castlevania CUrse of Darkness ::Greg Lyons.

Code: Select all

INPUT "Enter an integer for randoms limit:", VARIABLE%
'capture second hand
VALUE1$ = MID$(TIME$, 7, 2)
VALUE2% = VAL(VALUE1$)
IF VALUE2% < 25 THEN VALUE2% = VALUE2% + 24
ATTAIN1 = (((VALUE2% * 4) + 32) / 17.63) - 5
VALUE3$ = MID$(TIME$, 4, 2)
VALUE4% = VAL(VALUE3$)
IF VALUE4% < VALUE2% THEN VALUE4% = VALUE2% * 1.0018
IF VALUE4% < 25 THEN VALUE4% = VALUE4% + 16
ATTAIN2 = (((VALUE4% * 3) + 25) / 15) - 4
VALUE2N4% = INT((VAL(VALUE1$) + VAL(VALUE3$)) / 2)
IF VALUE2N4% < 25 THEN VALUE2N4% = VALUE2N4% + 21
ATTAIN3 = (((VALUE2N4% * 3.48) + 34) / 16.17) - 5
OBTAIN1% = INT(ATTAIN3 * .3104)
SELECT CASE OBTAIN1
    CASE 1
        Numbersought% = INT(ATTAIN1 * (VARIABLE% / 10))
    CASE 2
        Numbersought% = INT(ATTAIN2 * (VARIABLE% / 10))
    CASE ELSE
        Numbersought% = INT((ATTAIN1 + ATTAIN2) * .5722 * (VARIABLE% / 10)) - 1
END SELECT
PRINT Numbersought%
END

As well Ill leave it alone. Check this out still counts upwards but has more promise for large numbers.

HERE you go

Posted: Wed Jul 13, 2011 1:58 am
by TRANERAECK
I don't know what happen to the other source I was working on? I lost it somehow but here is a random number generator that I found on my computer hiding on there. I will have to try to connect one file with the other. Thanks for saving my code with that and this you will get random numbers.

Code: Select all

Code Example 1

The following is an example of the linear congruential method for generating
pseudo-random numbers:

' To try this example in VBDOS.EXE:
' 1. From the File menu, choose New Project.
' 2. Copy the code example to the Code window.
' 3. Press F5 to run the program.

DEFDBL A-Z ' Requires double-precision intermediate variables. a = 214013
             c = 2531011 z = 2 ^ 24

INPUT "Input any seed value: ", x0

FOR count = 1 TO 25   ' print 25 random numbers between 0.0 and 1.0:
  temp = x0 * a + c
' Calculate (temp MOD z) and assign to x1:
  temp = temp / z
  x1 = (temp - FIX(temp)) * z
' Print the result as value between 0.0000000 and 1.0000000:
  result = x1 / z
  PRINT result
' Reseed the calculation before the next iteration:
  x0 = x1   ' x0 and x1 range from 0 to 16777216 (2^24)
NEXT
Thanks again for saving my stuff now with this information I found I will get rid of RND. TRANE RAECK.

Posted: Thu Jul 14, 2011 5:06 pm
by burger2227
You probably LOST it because you post stuff anywhere you feel like!

SECOND WARNING! DO NOT COPY code of other people and post it here! If they wanted it posted here, somebody would have ASKED for it or the owner of the code would have posted it HIMSELF!

IF you continue to post haphazardly and post copyrighted stuff, I will not only remove your posts. I will remove you!