BBC BASIC for Windows
« RETURN <destination> »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:58pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: RETURN <destination>  (Read 330 times)
admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx RETURN <destination>
« Thread started on: Jun 14th, 2011, 10:40am »

As many of you will know, an automated QBASIC (or QuickBasic) to BBC BASIC for Windows translator is available:

http://www.rtrussell.co.uk/qb2bbc/

In many cases this can perform a 'perfect' translation, not requiring any manual tweaking to make the translated program run correctly.

One of the few QBASIC statements it proved impossible to translate was 'RETURN destination', the action of which is to return from a subroutine but to jump to the specified line instead of continuing execution following the GOSUB statement.

It is my intention to resolve this by implementing 'RETURN destination' in the next version of BB4W (it turns out to be very easy to do) - although I certainly wouldn't expect it to be used in new programs!

The reason I'm mentioning it now is that there's a minor compatibility issue. The following statement is illegal in BBC BASIC because there's no colon before the REM:

Code:
ON TIME PROCtimer : RETURN REM Activates timer 

Current versions of BB4W won't notice the error and will run as intended, but when 'RETURN destination' is implemented that line will result in a 'Syntax error' until the missing colon is inserted.

Hopefully nobody has omitted the colon in this context, but if you have please don't complain to me when your program stops working!

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls