Wrote a program using a gosub. Looked at the asm program and could not find the subroutine. Then looked at ding.txt ( demo program ) which did not have a gosub. So I removed mine, just used the subroutine label. That got the subroutine back. To test this put gosub in front of the call to ding in ding.txt ( there are 2 of them ) and compile. Result no code for the subroutine. By the way no compiler errors in all of this. My help file documents the gosub, but it looks like it should be left out.
Russ
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In GCBASIC, GOSUB was originally meant to be used to jump to a label within the current subroutine. I've changed its behavior, so that now it can also be used to call subs. If you download http://gcbasic.sourceforge.net/newfiles/update.zip now, it should work as expected.
The documentation for the next version of GCBASIC has also been changed to say that the name of the sub and a list of its parameters is all that is required to call it.
Thanks for the advice!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
< Great Cow BASIC (0.9 12/1/2007) >
Wrote a program using a gosub. Looked at the asm program and could not find the subroutine. Then looked at ding.txt ( demo program ) which did not have a gosub. So I removed mine, just used the subroutine label. That got the subroutine back. To test this put gosub in front of the call to ding in ding.txt ( there are 2 of them ) and compile. Result no code for the subroutine. By the way no compiler errors in all of this. My help file documents the gosub, but it looks like it should be left out.
Russ
In GCBASIC, GOSUB was originally meant to be used to jump to a label within the current subroutine. I've changed its behavior, so that now it can also be used to call subs. If you download http://gcbasic.sourceforge.net/newfiles/update.zip now, it should work as expected.
The documentation for the next version of GCBASIC has also been changed to say that the name of the sub and a list of its parameters is all that is required to call it.
Thanks for the advice!