'=========================================================================== ' Subject: REAL BIG LONG INTEGER GET-ARRAY Date: 01-07-99 (12:34) ' Author: Jacob Wieles Code: QB, PDS, PB ' Origin: jacwls@worldonline.nl Packet: GRAPHICS.ABC '=========================================================================== 'program : REALBIGL.BAS (05-01-99) ' This program finds the dimensions of the biggest ' pictures who can be put in a long-integer GET-array ' with 16381 elements. ' Maximum numbers of elements in 64K array : ' 16383 (Tabel 5.1 Users Guide) 'which basic : PowerBASIC (and - with remout $huge - Q(uick)basic) 'auteur : J.Wieles >>>>>> jacwls@worldonline.nl <<<<<< $huge 'a must for PB versie 3.5 if maxel > 16380 deflng a-z xleft=0 ytop=0 maxel=16383 biggest=16381 i=0 j=0 cls print" I will find how many pictures." print '========================================== do xright=639-i*8 ybottom=479 do while 1+(xright-xleft+1)/8*(ybottom-ytop+1)>maxel ybottom=ybottom-1 loop do while 1+(xright-xleft+1)/8*(ybottom-ytop+1)=>biggest j=j+1 ybottom=ybottom-1 loop i=i+1 loop until biggest/(1+(xright-xleft+1)/8)>479 '=========================================== dim x(j),y(j),arraysize(j) print" There are";j;"pictures." print while inkey$<>"":wend print" Hit a key for a look." hitkey$=input$(1) screen 12 i=0 j=0 color 10 do xright=639-i*8 ybottom=479 do while 1+(xright-xleft+1)/8*(ybottom-ytop+1)>maxel ybottom=ybottom-1 loop do while 1+(xright-xleft+1)/8*(ybottom-ytop+1)=>biggest reqsize=1+(xright-xleft+1)/8*(ybottom-ytop+1) line (xleft,ytop)-(xright,ybottom),10+j mod 5,b x(j)=xright y(j)=ybottom arraysize(j)=reqsize j=j+1 ybottom=ybottom-1 loop i=i+1 loop until biggest/(1+(xright-xleft+1)/8)>479 k=j-1 locate 10,2 while inkey$<>"":wend print"Hit a key for a general view." hitkey$=input$(1) cls print" A general view :" print tel=0 for i=0 to k tel=tel+1 print" x=";x(i)+1;" y =";y(i)+1;" arraysize =";arraysize(i),i+1 if tel mod 20=0 then print while inkey$<>"":wend print"Hit a key for next." hitkey$=input$(1) for j=0 to 22 locate 2+j,1 print space$(79); next j locate 3,1 end if next i while inkey$<>"":wend print print"Hit a key for end." hitkey$=input$(1) cls screen 0 print"Hit a key for the source." end