Qbasicnews.com

Full Version: Compiler Failure
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
V1ctor:
By compiling a complicated source, fbc stops without a message, leaving an incomplete asm file.
It's a source (not mine) I'm porting from QB. In QB it could not be compiled, it had to be run interpreted.
You can find the bas file and the incomplete asm at http://www.geocities.com/antonigual/TCRay.zip
(Right-click and save as...)

Please don't tell me i must split the file.... :-?
I get
Quote:tcray21c.bas(1532) : error 44: Illegal outside a compound statement, found: 'ELSE'

I am not using an IDE so i dont know where that line is >_>
Change row 1532 to:
Code:
IF VarMdb > 0 THEN Mandelbrot = 270 - 5 * LOG(VarMdb) ELSE Mandelbrot = 0
*Basically, remove all the :'s

Change row 1966 to:
Code:
IF Side < 0 THEN Side = -1 ELSE Side = 1
*Again, remove the :'s

Change row 2169 to:
Code:
IF Side < 0 THEN Side = -1 ELSE Side = 1
*Ditto

2194:
Code:
IF Ray(3) = 0 THEN Dist! = 0 ELSE FlagPlot% = 0: EXIT SUB
*Take a guess...

2241:
Code:
IF DR = 0 THEN Dist! = 0 ELSE FlagPlot% = 0: EXIT SUB
*You have to alter the capilatory sub-level stasis proton field flux capacitators

2262:
Code:
IF VarMdb > 0 THEN FlagPlot% = (INT(ABS(LOG(VarMdb))) MOD (4) + 1) ELSE FlagPlot% = 1
*This is some obfuscated code!

I mean, just look at this:
Code:
IF Side < 0 THEN Side = -1:  ELSE : Side = 1
Thoose :'s are whats causing the errors.

2269:
Code:
IF Side < 0 THEN Side = -1 ELSE Side = 1

2432:
Code:
IF DR = 0 THEN Dist! = 0 ELSE FlagPlot% = 0: EXIT SUB

2542:
Code:
IF DR = 0 THEN Dist1 = 0: Dist2 = 0 ELSE FlagPlot% = 0: EXIT SUB

2936:
Code:
IF Ray(3) = 0 THEN Dist! = 0 ELSE FlagPlot% = 0: EXIT SUB


Ohh, a new error, no more :'s?
Quote:tcray21c.bas(3037) : error 59: Type mismatch, at parameter: 1
That line says:
Code:
p = Arg(xh(1), xh(2)) / Pi

I can't even find the function: Arg() :???:
I moved to another computer and i could end the compile without problems. The compiler signaled the errors as whitetiger and Z!re found them. Curious...

Btw, the program does'nt work , but that's not the compiler's fault Big Grin