Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

no compiler error


MortenS Oct 21, 2011 12:54 PM

I just noticed an error in my code.

I was calling a subroutine, but instead of writing "call subroutine" I just wrote "subroutine"

But for some reason it compiled without an error ?!?

Should'n the compiler catch that error ?

Whould campbells developer have a look ? (or is it of no interest?)

I'm running CRBasic v3.2.0.46
CR1000
Compiler: C:\Campbellsci\Lib\Compilers\CR1Comp.exe
Version: CR1000.Std.21 CompileDate: 100922
DefFile: C:\Campbellsci\Lib\CRBasicDefFiles\CR1000.def
HelpFile: C:\Campbellsci\Lib\CRBasicDefFiles\CRBasic1.chm


Dana Oct 21, 2011 07:20 PM

It is legitimate to use only the subroutine name without the Call instruction. From the help file:

Use of the Call keyword when calling a subroutine is optional.

There is an error in the help, however, that reads: If Call is not used, the parentheses are omitted.

Parentheses are required for any arguments. This has been fixed in a version of the help that is not yet released.

Dana W.

Log in or register to post/reply in the forum.