Yes, I noticed that too...byWhen I first started programming I put duplicate label GOSUB's in sub programs and got an error. Couldn't figure it out since there was no actual conflict, just like with local variables. I guess QBasic only stores label names in a single list, regardless of where they're used, -hence, duplication. On the other hand, with separate naming (e.g. in sub a, subroutine x is ax:, and in b, bx:), you have additional clarity when debugging, etc.. I've found that giving local variables distinct names has similar advantages. -Bob from IP address 70.51.148.244 Return to Index |
| Response Title | Author and Date |
| *I've always just used "SubnameLabel:" and "MainLabel:" | on Sep 5 |
| Not a bad idea | on Sep 5 |
| Copyright © 1999-2008 Network54. All rights reserved. Terms of Use Privacy Statement |