home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 6
/
Sonderheft_6-96.iso
/
pd
/
libraries
/
locator
/
example
/
locator_example.e
< prev
next >
Wrap
Text File
|
1996-11-03
|
1KB
|
60 lines
/*
** This is a LOCATOR LIBRARY EXAMPLE
**
** Please, copy file Locator/Example/Locator.catalog TO Ram:
**
** IF the file is missgin, message will be in Italian! ;)
**
** This code is (C)Copyright 1996 Fabio Rotondo AND it is
** placed in the Public Domain.
**
*/
MODULE 'locator'
/* These conts were generated by LocConv ;) */
CONST MSG_ABOUT = 0
CONST MSG_MOMMY = 1
CONST MSG_HIEVERYBODY = 2
CONST MSG_COPYRIGHT = 3
PROC main()
DEF h:PTR TO LONG
IF (locatorbase:=OpenLibrary('locator.library',0))
IF Loc_Init()
IF (h:=Loc_AllocHandler())
IF Loc_Open(h,'Ram:Locator.catalog')
error('"Ram:Locator.catalog"')
WriteF('Messages will be in Italian!\n')
ENDIF
WriteF('About Msg: \s\n', Loc_Message(h, MSG_ABOUT, 'Locator Library è scritta da Fabio Rotondo.'))
WriteF('MOMMY Msg: \s\n', Loc_Message(h, MSG_MOMMY, 'Ciao Mamma!'))
WriteF('Hi Everybody Msg:\s\n', Loc_Message(h, MSG_HIEVERYBODY, 'Ciao a Tutti!') )
WriteF('Copyright Msg:\s\n', Loc_Message(h, MSG_COPYRIGHT, 'Copyright di Fabio Rotondo'))
Loc_Close(h)
Loc_FreeHandler(h)
ELSE
error('Handler')
ENDIF
Loc_Dispose()
ELSE
error('Loc_Init()')
ENDIF
CloseLibrary(locatorbase)
ELSE
error('locator.library')
ENDIF
CleanUp(0)
ENDPROC
PROC error(s)
WriteF('*** Error: could not open \s!!\n\n', s)
ENDPROC