Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MATRIX screen saver 4

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
have you seen the movie the matrix? if you have maybe you can help me. You know when there are all of those zero's and one's in green writing going all over the screen? thats what i want the screen saver to look like.

When the sreen saver stops I want the words: "THE MATRIX HAS YOU"
blinking on the screen.

please help me, this would be a realy cool screen saver.

thanks
 
[tt]
'A couple hours of hardcore coding & tweaking resulted
'in this. It could probably be mode significantly faster,
'this is more a proof-of-concept work -- a check to make
'sure that I'm still capable of programming these kinds of
'things ;D Enjoy, logiclrd

DECLARE SUB initscreen ()
DECLARE SUB loadfont ()
DIM SHARED font%(1 TO 41, 9, 11)
CONST MAXACTIVE% = 267
CONST MAXSTREAM% = 40
TYPE activeposition
bitmap(9, 11) AS INTEGER
desiredbitmap(9, 11) AS INTEGER
x AS INTEGER
y AS INTEGER
a AS INTEGER
END TYPE
TYPE
streamtype
x AS INTEGER
y AS INTEGER
taily AS INTEGER
a AS INTEGER
END TYPE

z% = MAXACTIVE%
DIM SHARED active(z%) AS activeposition, whichactive%(63, 39)
DIM SHARED stream(MAXSTREAM%) AS streamtype, freeactive%(MAXACTIVE%)
DIM SHARED freecolumn%(63), mask%(61), numfreeactives%, numfreecolumns%
loadfont
SCREEN 12
OUT &H3C8, 7
OUT &H3C9, 0
OUT &H3C9, 0
OUT &H3C9, 0
LINE (0, 0)-(9, 11), 7, BF
GET (0, 0)-(9, 11), mask%
LINE (0, 0)-(9, 11), 0, BF
FOR i% = 0 TO 15
OUT &H3C8, i%
OUT &H3C9, 0
OUT &H3C9, i% * 63 \ 15
OUT &H3C9, 0
NEXT i%
FOR i% = 0 TO 63
freecolumn%(i%) = i%
FOR j% = 0 TO 39
whichactive%(i%, j%) = -1
NEXT j%
NEXT i%
FOR i% = 1 TO MAXACTIVE%
freeactive%(i%) = i%
NEXT i%
numfreecolumns% = 64
numfreeactives% = MAXACTIVE% + 1
initscreen
DO
st# = TIMER
IF
numfreecolumns% THEN
FOR
i% = 0 TO MAXSTREAM%
IF stream(i%).a = 0 THEN
r% = INT(RND * numfreecolumns%)
stream(i%).x = freecolumn%(r%)
numfreecolumns% = numfreecolumns% - 1
freecolumn%(r%) = freecolumn%(numfreecolumns%)
stream(i%).taily = -(INT(RND * 15) + 10)
stream(i%).y = -1
stream(i%).a = 1
EXIT FOR
END IF
NEXT
i%
END IF
FOR
i% = 0 TO MAXSTREAM%
IF stream(i%).a THEN
IF INT
(RND * RND * RND * RND * RND * RND * 7) = 0 THEN stream(i%).y = stream(i%).y + 1
IF INT(RND * RND * RND * RND * RND * RND * 7) = 0 THEN
stream(i%).taily = stream(i%).taily + 1
IF stream(i%).taily = 2 THEN
freecolumn%(numfreecolumns%) = stream(i%).x
numfreecolumns% = numfreecolumns% + 1
END IF
IF
stream(i%).taily > 0 THEN
IF
stream(i%).taily <= 40 THEN
a% = whichactive%(stream(i%).x, stream(i%).taily - 1)
IF a% >= 0 THEN
active(a%).a = 0
whichactive%(active(a%).x, active(a%).y) = -1
freeactive%(numfreeactives%) = a%
numfreeactives% = numfreeactives% + 1
END IF
END IF
IF
stream(i%).taily >= 40 THEN stream(i%).a = 0
PUT (stream(i%).x * 10, stream(i%).taily * 12 - 12), mask%, AND
END IF
END IF
IF
(stream(i%).y >= 0) AND (stream(i%).y < 40) THEN
a% = whichactive%(stream(i%).x, stream(i%).y)
IF a% = -1 THEN
IF
numfreeactives% = 0 THEN
maxage% = -1
maxagei% = INT(RND * (MAXACTIVES% + 1))
FOR j% = 0 TO MAXACTIVES%
IF active(j%).a > maxage% THEN
maxage% = active(j%).a
maxagei% = j%
END IF
NEXT
j%
active(maxagei%).a = 0
whichactive%(active(maxagei%).x, active(maxagei%).y) = -1
freeactive%(numfreeactives%) = maxagei%
numfreeactives% = numfreeactives% + 1
END IF
numfreeactives% = numfreeactives% - 1
a% = freeactive%(numfreeactives%)
whichactive%(stream(i%).x, stream(i%).y) = a%
active(a%).a = 1
active(a%).x = stream(i%).x
bx% = stream(i%).x * 10
active(a%).y = stream(i%).y
by% = stream(i%).y * 12
FOR x% = 0 TO 9
FOR y% = 0 TO 11
active(a%).bitmap(x%, y%) = POINT(bx% + x%, by% + y%)
active(a%).desiredbitmap(x%, y%) = 0
NEXT y%
NEXT x%
END IF
c% = INT(RND * 41) + 1
FOR x% = 0 TO 9
FOR y% = 0 TO 11
bb% = active(a%).bitmap(x%, y%)
db% = active(a%).desiredbitmap(x%, y%)
sum% = bb% + db%
max% = (sum% + ABS](bb% - db%)) \ 2
b% = max% + (sum% - max%) \ 3
IF b% >= 15 THEN active(a%).bitmap(x%, y%) = 15 ELSE active(a%).bitmap(x%, y%) = b%
active(a%).desiredbitmap(x%, y%) = font%(c%, x%, y%)
NEXT y%
NEXT x%
END IF
END IF
NEXT
i%
FOR i% = 0 TO MAXACTIVE%
IF active(i%).a THEN
active(i%).a = active(i%).a + 1
bx% = active(i%).x * 10
by% = active(i%).y * 12
correct% = 0
FOR x% = 0 TO 9
FOR y% = 0 TO 11
bb% = active(i%).bitmap(x%, y%)
db% = active(i%).desiredbitmap(x%, y%)
IF bb% > db% THEN
bb% = bb% - 2
IF bb% < db% THEN bb% = db%
ELSE
bb% = db%
END IF
sum% = bb% + db%
max% = (sum% + ABS(bb% - db%)) \ 2
b% = max% + (sum% - max%) \ 3
IF b% >= 15 THEN PSET (bx% + x%, by% + y%), 15 ELSE PSET (bx% + x%, by% + y%), b%
IF active(i%).bitmap(x%, y%) <= bb% THEN
correct% = correct% + 1
END IF
active(i%).bitmap(x%, y%) = bb%
NEXT y%
NEXT x%
IF correct% = 120 THEN
active(i%).a = 0
whichactive%(active(i%).x, active(i%).y) = -1
freeactive%(numfreeactives%) = i%
numfreeactives% = numfreeactives% + 1
END IF
END IF
NEXT
i%
WHILE (TIMER = st#): WEND
LOOP UNTIL LEN(INKEY$)
SCREEN 0: WIDTH 80

DATA CD00610,F7030000,30000007,DD03,880880,98087100,E27000F,A9000AD2,40076000
DATA CF5000B1,450BCD93,F001D73,F001,0,0,DC000070,7A2000,5B000904,6A000
DATA 781005B,6200FB00,5B000E,5B00DA72,6A0000,8530005B,1F00C580,10F8,F0,0,0
DATA B042000,C07000F,9430D844,80DA9000,E2000F9,5B0,5B000,F9800000,20000000
DATA C3100086,64FA4400,251000E7,BD,0,0,DF00220,10A84000,5B000E92,69100
DATA CF50005B,30005B00,5B0094,5B009430,CF5000,6A0005B,84109930,F002300E,C,0,0
DATA 220,EE640EE,C7009F20,94300D,E2FD4DC7,D94E1700,5EF70000,C70000DA,97FF2D
DATA 5B000DC7,ED730,23056,CF00,0,0,220,EE640DF,C7005500,5B000D,E2FD4DC7
DATA D94E1700,5EF70000,C70000DA,FF2D,DC7,CFED730,F0023000,C,0,0,FC033000
DATA CF8000F,A060D763,A0EC6000,6,5B0,6105B000,6A0AF00,70BC6030,DC7000DC
DATA 72FCE800,143000E8,FCD,0,0,40C0310,BAA20FD,5B00E665,5B000,5B0005B
DATA 5000BB00,9B0005,5B000570,5B000,5B0005B,750B9840,B0140C8,CF05,0,0
DATA F0000400,E405100D,A0E,DC7,DC700,DC70000,C7000000,D,DC7,DC700,FED50500
DATA 5000C,CF0,0,0,13000,6000EE,CEA6,5B00,5B0000,5B000000,C4000,5B0005B
DATA B0005B00,781005,E880B070,AF530000,F,0,0,4FD0040,FCA651FD,5B00E908,B140
DATA B055B,73BB00,605D0000,5B0000F9,8800,EC6005B,90ED9741,ED0041CB,C130,0,0
DATA DF00220,A624000,B000000A,5,5B0,5B000,5B00000,B000F100,5B0005,5B0005B0
DATA 97230,23056,CF00,0,0,3000FD22,7D93C1,BCBE8F83,B093C80E,94B80876,E4A75B0
DATA 1715B094,5B09437,B0943AD9,94300005,340DE9A2,DE03173,FC014,0,0,400DF40
DATA 1B7842DF,DB008E45,DC7008,DC70957B,7EB75B00,805B00DC,5B00DC78,DC3040
DATA DB08005B,B2ED9930,ED0230D6,FE30,0,0,0,1710000,88100F9F,70F7910F,952000EB
DATA 790,5B079,7905B00,80790000,862000F9,910F8810,8100F7,EAF,0,0,0,F074000
DATA 43000EAE,F88109,A2400943,60094300,C8300CE,630009F1,D0A,943,94300,F074000
DATA F7,0,0,0,1710000,88100F9F,70F8810F,871000EB,790,5B079,7905B00,80790000
DATA 871000F9,910F8810,7200F7,50000E81,D3DCB7,BC23FD71,0,F0F19100,6A0000BC
DATA BE700,6A0006A,15006A00,10DD000A,6A0000AB,A240,CF5006A,80006A00,D9E29108
DATA F6920,0,0,0,810000,8900091D,5740F,880006A,BD800,5400000,F9F,20069100
DATA DC7000B3,A00F6830,1242006,E90,0,0,0,1019000,5B0AB1F,B0943DC7,943DC705
DATA 1DC70B50,C70000D2,D,DC7,DC700,DC70000,1640000,F7F,0,0,0,37F29000
DATA 9430AB16,3005B000,5B00094,B0009430,943005,943005B0,2005B000,6A00086
DATA 430F8900,810009,9E,0,0,0,ACF7400,CF5C9146,B14000,7900079,710F9800
DATA 9520008,90000EB7,7907,B10F50,7090000,7000000,9,0,0,0,17FF7400,88E7019
DATA 70B14000,CE68F9EB,87FACF50,16C240F9,D6200797,67D2F,7252709,FA07FA00
DATA AD90007,AD9,0,0,0,C909200,9520AB29,95200,880B23,FA304000,BA000000
DATA 5000000B,EB4E,FA70B23,80009520,AB09208,7E29,0,0,0,C909200,87107E56,88000
DATA F980B14,CE3C7000,DA000000,9,DC7,DC700,DC70000,1640000,F7F,0,0,0,FB0000
DATA 5B0007F0,A1500,77205B,6A0E200,A8000000,5000000E,C40B0,5B00862,B0006A00
DATA F83005,420,0,0,0,B5100000,F,916,EF3000,86C33000,A420000,FA7,8800,880000
DATA FB600000,F3000000,E,0,0,0,0,F1000AD9,A0600,C140655,437B00F,D95F30DE
DATA 9E020CF4,E8827,A60790,20079000,62000E0,DBF1,0,0,0,C4000,F7A000A6
DATA 600F8900,91D7030A,B4020E01,B50F,F1A60FD4,D50FD400,CE231D1,F7C21692
DATA F4197EA2,E20C0,0,0,0,220F1000,D3609C52,AD60EF,DD3300,9430000,D6000000,D
DATA 79,C130,C4000,0,0,0,0,F3000000,E,646,6820,F7A000,DA180000,4B510000
DATA D30000ED,FC50,FA7000,F9800000,A0000000,6,F10,0,C40000,25000000,9
DATA 200E2C31,B96010D6,90009610,9430F8,E1100790,CF500,880000,FA700000
DATA D4000000,F,0,0,FA700000,C0000000,AA,10EE34D0,404B4125,5CD5E400,6A000083
DATA 7000DA90,4C0DC,8260B14,5372C130,5000000F,FC,0,0,EF3000,62800000,B0000000
DATA F6,7E122D18,7340D230,900D3000,BC,592,E8A00,DB8000,FB42000,0,0,0,97100000
DATA 9F8000F,44000E7B,5B08,21BA2871,57FB200F,9520F00,43000079,7909,880000
DATA CF500000,50000000,B,0,0,0,21040000,2400F712,FED,93332000,D850E140
DATA D00D30F0,F4,763,E9900,B14000,C040000,F0100000,0,0,0,46000000,6,673
DATA 7F1E6311,F84FD090,81000000,D3000F17,80853691,F805A1EA,7E8393D,D4000E11,F
DATA 0,0,0,0,C9000AF7,7540B,8440B05,340C0400,CF50009,C8000934,B050C,CD70FF2
DATA 6A000000,50000000,B0,C13,F010,B1400000,30000000,67,20DDC820,FE9200F7
DATA 95285300,48710000,222EE3C5,23FEB01D,B140FC,B1400000,60000000,A0,CE60,0
DATA F1000,990F1000,763F674E,727943,5B00097,E7000000,3000000B,94,853,B140
DATA FF200,0,0,0,0,93400000,93000000,410000B9,E670,F314C000,B60211F,70DC6CE1
DATA 8,DD6,6910,F98000,EE40000,0,0,0

SUB initscreen
DIM orderx%(2559), ordery%(2559)
FOR iterate% = 1 TO 300
IF numfreecolumns% THEN
FOR
i% = 0 TO MAXSTREAM%
IF stream(i%).a = 0 THEN
r% = INT(RND * numfreecolumns%)
stream(i%).x = freecolumn%(r%)
numfreecolumns% = numfreecolumns% - 1
freecolumn%(r%) = freecolumn%(numfreecolumns%)
stream(i%).taily = -(INT(RND * 15) + 10)
stream(i%).y = -1
stream(i%).a = 1
EXIT FOR
END IF
NEXT
i%
END IF
FOR
i% = 0 TO MAXSTREAM%
IF stream(i%).a THEN
IF INT
(RND * RND * RND * RND * RND * 7) = 0 THEN stream(i%).y = stream(i%).y + 1
IF INT(RND * RND * RND * RND * RND * 7) = 0 THEN
stream(i%).taily = stream(i%).taily + 1
IF stream(i%).taily = 2 THEN
freecolumn%(numfreecolumns%) = stream(i%).x
numfreecolumns% = numfreecolumns% + 1
END IF
IF
stream(i%).taily >= 40 THEN stream(i%).a = 0
END IF
END IF
NEXT
i%
NEXT iterate%
p% = 0
FOR x% = 0 TO 63
FOR y% = 0 TO 39
orderx%(p%) = x%
ordery%(p%) = y%
p% = p% + 1
NEXT y%
NEXT x%
FOR p% = 2559 TO 1 STEP -1
r% = INT(RND * p%)
SWAP orderx%(r%), orderx%(p%)
SWAP ordery%(r%), ordery%(p%)
NEXT p%
FOR p% = 0 TO 2559
x% = orderx%(p%)
y% = ordery%(p%)
bx% = x% * 10
by% = y% * 12
c% = INT(RND * 41) + 1
FOR sx% = 0 TO 9
FOR sy% = 0 TO 11
PSET (bx% + sx%, by% + sy%), font%(c%, sx%, sy%)
NEXT sy%
NEXT sx%
FOR i% = 0 TO MAXSTREAM%
IF stream(i%).a THEN
IF
x% = stream(i%).x THEN
IF
(stream(i%).taily <= y%) AND (stream(i%).y >= y%) THEN EXIT FOR
END IF
END IF
NEXT
i%
IF i% > MAXSTREAM% THEN PUT (bx%, by%), mask%, AND
NEXT p%
END SUB

SUB
loadfont
FOR i% = 1 TO 41
x% = 0: y% = 0
FOR j% = 1 TO 120 STEP 8
READ thisset$
FOR k% = 1 TO 8
IF LEN(thisset$) THEN
thiscode% = (thiscode% + VAL(&quot;&H&quot; + RIGHT$(thisset$, 1))) AND 15
thisset$ = LEFT$(thisset$, LEN(thisset$) - 1)
END IF
font%(i%, x%, y%) = thiscode%
x% = x% + 1
IF x% = 10 THEN x% = 0: y% = y% + 1
NEXT k%
NEXT j%
NEXT i%
END SUB

 
Holy cow, logiclrd!
That's friggen amazing! It's even better than the one I got from the movie studio's site. If I saw only the .EXE, I would've guessed it was written in C++ and OpenGL or something. I had to change one thing in the code to make it work though. There's a line that reads
max% = (sum% + ABS](bb% - db%)) \ 2
I removed the extra close bracket character, and it ran in in QB (PDS) 7.1 using QBX /AH, and it worked!
max% = (sum% + ABS(bb% - db%)) \ 2
How did you encode the font? Is it a 9x11 bitmap as the TYPE statement suggests?


 
Heh, the square bracket came from the colouring codes, I must have placed [ignore][/color]] instead of just [/color][/ignore]. The font is 10x12 (arrays being 0-based), and it's delta-encoded as groups of 15 32-bit hexadecimal numbers in the DATA statements. The sub 'loadfonts' shows how it is decoded, and what I mean by delta encoding. The only problem that I have with it is how slow it is =} PSET and POINT are horribly slow in 4-bit graphics modes, but I needed the resolution.

I made the font by typing the alphabet in Courier New, and then some random japanese characters in a font called NSimSun that I happened to have, into a Word document. I set the font size to 48 at 100% magnification, took a screenshot, and then grabbed each character as a 40x50 character box. I then performed a bicubic resample down to 10x12, and stored the result as .RAW files. I wrote a program to quantize the .RAW files down to 4 bits per pixel (but left them at one byte per pixel in the file), then I wrote a program to do the delta encoding on all of the files and tack the corresponding DATA statements to the end of the source code. Once I'd written the delta decoder, the font was in standard bitmapped form in memory, and easy to work with. It took about an hour, all things accounted for, most of which went into getting uniform 40x50 selection boxes around the characters (in the end, I actually went for anything with the same number of blank pixels to the left and right of the character, and then pasted that as a new image and set the canvas size to 40x50 keeping the image centred, PSP all the way). The code itself was about another hour and a half, with a bit of tweaking to get the trails to look good and the ratio of 'actives' to 'streams' at a sufficiently good level that actives would not be usurped too often.

It was fun =}
 
Why isn't it working for me? &quot;bitmap(9,11) as integer&quot; near the start is confusing QB.
KingOfSnake - The only sports drink with ice crystals
(and marshmellos!)
 
It uses arrays within user data types, which is only supported by versions of QB over 6 (I use 7.1, from the PDS (Professional Development Suite)). If you hunt around, you should find it. It isn't technically kosher for me to transmit it to you by means of this forum =}
 
I got qb 7.1 but it still has problems. Do I need to do something special? What was that qbx stuff that toshi was talking about?

KingOfSnake - The only sports drink with ice crystals
(and marshmellos!)
 
There is one typo in the post too. The line that reads:
[tt]
max% = (sum% + ABS](bb% - db%)) \ 2[/tt]

.. should read:

[tt]
max% = (sum% + ABS(bb% - db%)) \ 2[/tt]

Note that this is the only occurance of ']' in the code, so if you search for ']' and remove it, it should run fine.
 
logiclrd: i tried running your prog in qb 7.1, and got a &quot;subscript out of range&quot; error on this line:
DIM SHARED active(z%) AS activeposition, whichactive%(63, 39)
any idea what caused this?
 
This is somthing i did ages ago very quickly, it is rather messey code, i have a nicer version at college which i wrote in alecter because i was bored :)
You can easily modify teh chr$(number) to a$ wen a$ = 1 or 0 tho im sure :)

SCREEN 9
CLS
DIM o, downs, chrs, Timers, info(10)

OPEN &quot;info.inf&quot; FOR INPUT AS #1
FOR i = 1 TO 3
INPUT #1, info(i)
NEXT i
CLOSE #1

REM ***ASSIGN VALUES****

downs = info(1)
chrs = info(2)
Timers = info(3)
defcolor = info(4)
bricolor = info(5)
numbers = info(6)
colorchnace = info(7)


REM ***End of that bit****
o = 14
REM COLOR 10=light green color 2=green
PRINT &quot;&quot;
RANDOMIZE TIMER
90
FOR i = 1 TO 90000


p = p + 1
IF p = Timers THEN GOTO 17 ELSE GOTO 101
17 y = INT(RND * 1000)
p = 0
IF INKEY$ <> &quot;&quot; THEN GOTO 91
a = INT(RND * 80)
IF a <= colorchance THEN COLOR 10 ELSE COLOR 2


12 B = INT(RND * 255)
IF B < 100 THEN GOTO 12
19
f = INT(RND * 57)
IF f < 48 THEN GOTO 19



x = INT(RND * 10)
IF x < numbers THEN B = f ELSE B = B
18
IF d = downs THEN PRINT &quot;&quot;: d = 0: GOTO 10

IF c = 0 THEN IF d = 0 THEN PRINT &quot; &quot;;
c = c + 1
IF c = chrs THEN PRINT &quot; &quot;; : d = d + 1: c = 0 ELSE IF B <= 9 THEN PRINT B; ELSE PRINT CHR$(B);
10
101 NEXT i

REM o = o - 1
REM IF o <= 3 THEN GOTO 91
GOTO 90
91
REM LINE STEP(10, 15)-STEP(14, 12), 10, BF
REM LINE (45, 56)-(67, 78), 10, B
REM LOCATE 13, 32
REM COLOR 10

REM PRINT &quot;System Failure&quot;

REM INPUT &quot;&quot;; a$
END

 
The /AH switch to the QuickBASIC IDE and compiler allows it to handle/produce code to handle arrays that span more than one segment. These arrays can contain up to 128 kilobytes of data (I've heard rumours they can hold even more). My array active() is 130,248 bytes long. Keeping in mind that one kilobyte is 1,024 bytes, this corresponds to 127.195 kilobytes. Since this is larger than a real mode segment (which is 64 kilobytes long), without the /AH switch, this is too large for QuickBASIC to handle. However, with /AH, the array is permitted -- at the expense of some speed -- to consist of multiple chunks, thus permitting my code to function :)
 
Hey Need Help Try This,

cls
screen 12
color 10
do while inkey$ = &quot;&quot;
a = int(rnd * 29) + 1
b = int(rnd * 80) + 1
c = int(rnd * 2) + 1
if c = 1 then d = 1
if c = 2 then d = 0
locate a, b
print c
loop
sleep 1
do while inkey$ = &quot;&quot;
e = int(rnd * 28) + 1
f = int(rnd * 80) + 1
locate e, f
print &quot; &quot;
loop
cls
locate 12, 28
print &quot;The Matrix Has You . . .&quot;
sleep 4
end
 
logiclrd:
What kind of font does your code load? Are they Windows fonts or custom ones?
 
The font originally comes from Courier New (for the English characters) and MS Song (I think) (for the Japanese characters). I scaled the font characters down to 10x12 in Paint Shop Pro and saved them as raw binary data. I then ran a little snippet of code to go through that binary data and quantize it down to values 0-15 instead of 0-255, so that it would be compatible with [tt]SCREEN 12[/tt]. I then packed the font data into a single array, did a delta transformation on it (which consists of subtracting the previous element from each element, which turns runs into strings of 0's), and finally put the data -- as [tt]LONG[/tt]s -- into the large block of [tt]DATA[/tt] statements at the bottom of the main block of code in the module.

To load the font, each [tt]LONG[/tt] is read in turn, and each of the 8 4-bit values is extracted from it, and each one in turn is used as a delta to a &quot;current&quot; value (this does the opposite of the delta encoding, and thus returns the font to its original form), and stores each &quot;current&quot; value in the correct position in the font array.
 
Is there any way to copy text on the web site to qbasic 4.5, cause i dont really want to type out all of logiclrd's code for that &quot;amazing&quot; matrix s.s.
 
Just click and drag over it with the mouse. Alternately, you can click once on the text at the start, then scroll to the end without clicking on the document, and hold down shift while clicking on the last character. That will select everything between the two clicks. Once it is selected, you can do Edit->Copy, and then you can open up Notepad and do Edit->Paste. Then you have the document in a text editor and you can save it anywhere you like. Notepad likes to add '.txt' to the end of all filenames it saves with, but you can disable this by putting quotes around the filename in the input box when saving.
 
For some reason it says on the 5th line or somthing that I need an &quot;=&quot; where the &quot;as&quot; is. Anyone wanna help me out here.
PS. Im using QB 4.5
 
That's the problem right there :) Arrays within [tt]TYPE[/tt]s are a feature available only in QB71 and not QB45.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top