Hi Guys
I was working with one of my old applications and decided to plug in some of its files into my current application using the IDE include files panel. During compile I now keep getting a compile early exit error
You have hit a FUNCTION declaration mid program. Now, if i copy and paste all the code into one file the application compiles and runs. I've even tried using the #include but this still gives the error. The original code used to work (I've got the exe) but even it wont compile.
Here is some sample code....
Main.dba
Cls
`Un-Rem the next line for local include
`#include "Test.dba"
`a couple of random numbers
nR1=RND(10) : nR2=Rnd(10)
Print nR1," x ",nR2," = ",
nR3=Test(nR1,nR2)
Print nR3
Print "Squared = Test(nR3,nR3)
Wait Key
End
Test.dba
Function Test(A,B)
nRet= A * B
EndFunction nRet
I've tried this with both DBP IDE and Codesurge with similar results from both, is it the compiler ???
Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.