ban2/png

tutor/gif
Home

cell/gif

Reporting syntax errors

The following exercise generates a simple syntax error and will enable you to check that error reporting is working properly on your setup

cell/gif
1/gif Create an AppBasic shell application
This is done via the New app entry in AppBasic's iconbar menu
2/gif Add an ‘Initial Event’ handler to !RunImage
menu/png
  1. Pop up the application's processing menu.
    Double-click the application while holding down the Ctrl key - alternatively you can drag the application onto AppBasic's iconbar icon
  2. Select the Initial entry in the Event handlers submenu
    This adds an empty definition of the Initial event-handler to !RunImage. This procedure will be called - once only - when the application is double-clicked
  3. Amend the definition of the event handler to
    DEF PROCDealWith_InitialEvent
    x=1/0
    ENDPROC
3/gif Double-click the application
Here is how the error is reported when three of the best-known editors are used

StrongED

sed/gifStrongED is configured for throwback via the respond to options in the Global choices dialogue box (opened via the Choices entry in StrongED's iconbar menu). When an error occurs a window owned by StrongED opens containing the error info. Selecting the error line opens a StrongED window, containing the appropriate BASIC file in !RunImage, with the offending line highlighted.
N.B. StrongED works with Editor line numbers (configured via AppBasic's Choices/Errors submenu of the iconbar menu).

Zap

zap/gif When an error occurs a window owned by Zap opens containing the error info. Selecting the error line opens a Zap window, containing the appropriate BASIC file in !RunImage, with the offending line highlighted.
N.B. Zap throws back to BASIC line numbers.

Edit

edit/gifWhen Edit is used a window owned by the AppBasic manager is opened. Selecting the button marked Throwback opens an Edit window containing the appropriate BASIC file from !RunImage with the offending line highlighted. N.B. StrongED works with Editor line numbers.

DeskEdit

Although DeskEdit is throwback-capable, BASIC files which are "thrown back" are not detokenised (at least in earlier versions of DeskEdit). However if DeskEdit's throwback feature is disabled, DeskEdit behaves exactly as !Edit above.

4/gif Worked solution