Menu

Gosub adventures

2007-01-12
2013-05-30
  • Russ Hensel

    Russ Hensel - 2007-01-12

    < 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

     
    • Hugh Considine

      Hugh Considine - 2007-01-13

      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!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.