BBC BASIC for Windows
« Will PROC_transpose(A$(), B$()) work ? »

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



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: Will PROC_transpose(A$(), B$()) work ?  (Read 1159 times)
Edja
Developer

member is offline

Avatar




PM


Posts: 60
xx Re: Will PROC_transpose(A$(), B$()) work ?
« Reply #12 on: Mar 25th, 2015, 1:26pm »

Quote:
I must have corrected my error without even being aware of it.

OK, I found an older version of my program with the same behaviour. The culprit was the following line ON ERROR PROC_comexit : QUIT

When I call PROC_transpose(A$(),B$()) control is given to the above line and PROC_comexit executes. BUT I forgot to execute PROC_cominit to initiate COMLIB. I suppose another error is then generated ....

When I remove ON ERROR PROC_comexit : QUIT control is given to another ON ERROR at the start o f my main program and the message "Type mismatch" correctly appears.
In the end it had nothing to do with PROC_transpose$ but with my clumsy way of error handling. As said in my previous mail this is now corrected.
Eddy

User IP Logged

rtr2
Guest
xx Re: Will PROC_transpose(A$(), B$()) work ?
« Reply #13 on: Mar 25th, 2015, 2:57pm »

on Mar 25th, 2015, 1:26pm, Edja wrote:
ON ERROR PROC_comexit : QUIT

You should never - at least not in any normal circumstances - have a (non-LOCAL) ON ERROR statement which doesn't report the error! Not only will any mistakes you introduce into the program yourself lead to an unexplained exit, but any unexpected error which happens when your end user runs the program will generate no diagnostic information to help you trace the problem!

Options for reporting the error are to print it to the 'main window' (but that can very easily be hidden by something in the foreground, or disabled) display it in a message box (my usual preference, because it's guaranteed to be visible), write it to a log file, or perhaps a combination of these.

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