[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2008-09-02T14:55:55-05:00 http://petesqbsite.com/phpBB3/app.php/feed/topic/2756 2008-09-02T14:55:55-05:00 2008-09-02T14:55:55-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=17816#p17816 <![CDATA[Cross Referencer]]>
I've took the idea to FreeBasic, and here's the result:

Code:

dim a as integerdim b as integerdim count as integerdim countplace(20) as integerdim ff as integerdim map(10,10,10,10) as stringdim n as integerdim o as integerdim p as integerdim q as integerdim sourcemap as stringdim sourcemapname as stringdim temp as stringdim w as integerdim x as integerdim y as integerdim z as integerprintprint "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="print "Cross Reference builder B-version 0.1.6"print "- - - - - - - - - - - - - - - - - - - -"print "(C) Copyright 2008, McClouth Software"print "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="printprint "#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#"print "STEP 1: Convert to HTML"print "---------------------------------------"input "Source code map: ", SourceMapprint "======================================="print "Creating temporary ServerMap... ";mkdir "temp"color 2print "[DONE]"color 7print "======================================="print "Processing " + SourceMap + "..."print ".......................................print "Reading FAT-table:"color 4'get SourceMapNameif right$(SourceMap, 1) = "\" then    SourceMap=Left$(SourceMap, LEN(SourceMap)-1)end ifcount = 0for a=1 to len(SourceMap)    if mid$(SourceMap,a,1)= "\" then        count=count+1        countplace(count)=a    end ifnextn=1o=0p=0q=0SourceMapName=right$(SourceMap,len(SourceMap)-(CountPlace(count)))map(n,o,p,q)=SourceMapNameprint "                " + map(n,o,p,q);:color 7:print "\"shell "dir /ad /b "+SourceMap +" > temp\"+sourcemapname+".dir"ff= freefileopen "temp\"+sourcemapname+".dir" for input as #ffdo while not eof(ff)    input #ff, temp    o=o+1    map(n,o,p,q)=temploopclose #ffp=0for a = 1 to o    if a = b then p=0    shell "dir /ad /b "+SourceMap+"\"+map(n,a,0,0)+" > temp\"+map(n,a,0,0)+".dir"    ff = freefile    open "temp\"+map(n,a,0,0)+".dir" for input as #ff        do while not eof(ff)            input #ff, temp            p=p+1            map(n,a,p,0)=temp        loop    close #ff    b=b+1next aff = freefileopen "temp\temp.html" for output as #ffprint o;p;qprint "press any key"sleepfor w=1 to 20    for x = 0 to 20        for y=0 to 20            color 4            if map(n,w,x,y) = "" then                'do nothing            else                if (w > 0) then color 5                if (x > 0 ) then color 6                if (y > 0 ) then color 7                print "                "+map(n,w,x,y);:color 7:print "\"                print #ff, n;",";w;",";x;",";y;" - ";map(n,w,x,y)+"<br>"            end if        next    nextnextclose #ffcolor 7print "......................................."printprint "#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#"print "Press any key..."sleepprint "Removing temporary ServerMap... ";kill "temp\*.*"rmdir "temp"color 2print "[DONE]"color 7
It works on everything so far, but something leaves me clueless, the map-array thing pulls a funny on me, it reproduces maps already in the list on high number, 11 and 15... Can someone help me out here?

Thx

Statistics: Posted by Seb McClouth — Tue Sep 02, 2008 2:55 pm


]]>