09-05-2022, 02:11 AM
(09-04-2022, 06:45 PM)madscijr Wrote:(09-04-2022, 06:10 PM)Kernelpanic Wrote: If you put brackets around it, are there fewer mistakes.
One thing I learned in VBA is, if you're calling a routine that doesn't return a result (a sub), like
mySub(param1, param2, param3)
then leave off the parentheses:
mySub param1, param2, param3
if you want the parentheses, then put Call before the routine name:
call mySub(param1, param2, param3)
I'm not sure if this makes a difference in QB64, but in VBA, the IDE doesn't complain about the syntax that way...
This is the same BASIC behavior which goes back to the days of QBASIC. It's the expected standard reaction with SUBs.