' *** STANDACC.GFA *** <<< delete line 0 and 1 >>> 14 September 1993 ' *** This is the standard program-structure for an accessory ' ============================================================================== ' *** INLINE *** ' ' *** WARNING: Editing above this line will destroy INLINE-data *** ' ------------------------------------------------------------------------------ ' ******************** ' *** .GFA *** GFA-Basic 3.07 ' ******************** ' *** An accessory should run in all resolutions, preferrably in a window ' *** After testing as a GFA-program, compile as *.ACC ' *** Change EDIT into QUIT and the compiled program also runs normally (*.PRG) ' ' ------------------------------------------------------------------------------ ' *** Initiation *** ' DEFWRD "a-z" ! word variables (-32768 to +32767) default OPTION BASE 0 ! first element of array has index 0 $m10000 ! <<< memory for variables and arrays >>> acc$="Accessory" ! <<< accessory-name: will appear in menu >>> ' ' ------------------------------------------------------------------------------ ' *** Main Program *** ' appl.id=APPL_INIT() ! what's our identification-number? IF appl.id ! if we have a number, we must be an accessory menu.id=MENU_REGISTER(appl.id," "+acc$) ! register our accessory IF menu.id>=0 ! are we properly registered (visible in menu)? DO ! enter endless loop: accessories never exit ~EVNT_MESAG(0) ! any messages for us? IF MENU(1)=40 ! yes, we'll have to become active now @main ! do our accessory-stuff in Procedure Main ENDIF LOOP ENDIF ELSE ! no number, so we're not an accessory yet @main ! test Procedure Main in GFA-program EDIT ! back to GFA-editor (use QUIT before compiling) ENDIF ' ' ------------------------------------------------------------------------------ ' *** Procedures *** ' PROCEDURE main ' ' *** This is where the (accessory-)action is ' ' Not much happening at the moment... ' RETURN ' ' ------------------------------------------------------------------------------ ' *** Functions *** ' ' ' ------------------------------------------------------------------------------ ' *** Data *** ' ' ' ------------------------------------------------------------------------------ ' *** The End *** ' ==============================================================================