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.
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
Logged
rtr2 Guest
Re: Will PROC_transpose(A$(), B$()) work ?
« Reply #13 on: Mar 25th, 2015, 2:57pm »
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.