close

Вход

Забыли?

вход по аккаунту

?

Programming in ISIS

код для вставкиСкачать
Programming in ISIS
an introduction
(by E. de Smet,
Univ. of Antwerp)
Why programming in a database ?
пЃ¬
пЃ¬
пЃ¬
Extension of functions which are lacking, e.g.
in ISIS/DOS : printing first occurrence only,
limiting length of output etc.
Solving problems which are a-typical, e.g.
GMOD : global changes in database, changing
tags of fields, adding subfields in all records
etc.
Adding �interface’ e.g. more user-friendly ways
of dealing with the software
3 types of ISIS-programming
1.
ISIS/Pascal : as �format exits’ or as �menu exits’
–
–
2.
3.
format exits : ISIS/DOS and WinISIS, no �interface’
menu exits : only ISIS/DOS
ISISDLL : GUI applications based on preprogrammed ISIS-functions in DLL, running (in- or)
outside WinISIS
ISIS-plugins : GUI applications based on any
language but with links to running ISIS-environment
(open database, PFT..), running within WinISIS (not
yet fully implemented)
ISIS/Pascal : Format Exits
пЃ¬
small functions for processing not available in
Formatting Language, mostly processing database
values, e.g.
–
–
пЃ¬
lenlim : limit output of field to max. length
occ1 : take only first occurrence
simple example : hello.pas
Program HELLO(s1:string, lw,occ:real, s2:string)[FORMAT];
Begin
s2:=s1;
End.
пЃ¬
calling in PFT : &hello(�Hello !’)
ISIS/Pascal : Menu Exits
пЃ¬
пЃ¬
пЃ¬
small, upto full-fledged programs to be run as an option
in an ISIS/DOS menu or as �R’ in the �Advanced
Programming Services’ main-menu item (not WinISIS)
e.g. : GMOD (global changes), ODIN (data entry), IRIS
(searching), Heurisko…
example : Program HELLO[MENU];
Begin
{very beginning of program}
Clear;
{clears the screen in DOS-window)
Cursor(11,11);
{puts cursor at position x=11 y=11}
Writeln(�HELLO !'); {writes text at cursorposition}
End.
{very end of program}
(does not run in WinISIS because of �interface’)
Exercise : your own �hello’ program
пЃ¬
3 steps :
–
–
–
пЃ¬
пЃ¬
пЃ¬
Writing the �source’ with text-editor
Compiling the source to �binary’ with WinISIS
Running the program from a format
Writing source : beware of small things, esp.
interpunction ! E.g. :=, ;, “ vs. � � etc.
Compiling (not on NTFS-disks..) and debugging, using
debug-info from WinISIS
Run in PFT : &HELLO(�your text’)
ISISDLL Programming
пЃ¬
пЃ¬
ISISDLL : a �library’, dynamically linked into other
programmes invoking standard functions preprogrammed in the DLL, taking away the need to deal
with most complicated ISIS-input/output operations
most used programming environments :
–
–
–
пЃ¬
C++
Visual Basic
Delphi (Pascal)
- JAVA
modern programming is �object’-based : all parts are
objects with properties and �methods’
–
–
e.g. PFTText.text is the �text’property of the input-object PFTText)
srcMFN.MFN = MFN part of the �structure’ srcMFN in which all MFN’s are put
by function call IsisSrcMfnMap(a,0,0,i,i,srcMFN)
ISISDLL : the components
пЃ¬
пЃ¬
пЃ¬
пЃ¬
пЃ¬
programmed and provided for free by : BIREME (and
UNESCO) at http://www.bireme.br/isis/l/isisdll.htm
ISISDLL.DLL : the real library file
ISIS001.* (.PAS for Delphi) : constants and structure
declarations
ISIS32.* (.PAS for Delphi) : declarations for all DLL
functions
current release : v.7 (fall 2001)
ISISDLL Programming (2)
пЃ¬
e.g. functions to open a database, read and format a
record (in Delphi) :
–
a:= IsisAppNew;
{creates a temporary memory space for an ISIS-
application}
–
–
h:= IsisSpaNew(a); {creates a new ISIS_DLL space}
r:= IsisSpaMf(h, PChar(PChar(dbText.Text))); {organises memory to
contain one record of the database given in dbText and all necessary
database-elements}
– r:= IsisRecRead(h, 0, srcMfn.mfn); {reads MFN into memory}
–
r:= IsisSpaPft(h, PChar(pftText.Text)); {puts the whole Formatting
Language in memory to work with the PFT as given in pftText}
–
r:=IsisRecFormat(h, 0, Area, 60000); {actually formats the current
record according to the current selected format and puts the output in the
memoryspace Area}
ISISDLL programming example
пЃ¬
пЃ¬
WinIRIS : simple searching in Windows
features :
–
–
–
–
пЃ¬
пЃ¬
database selection and PFT selection (file or actual formatting
statements)
about box
dictionary consultation while typing search terms with
Windows-style Ctrl or Shift-click for multiple selection
immediate results display
only 260 lines of code, thanks to ISISDLL ! Most of
them generated by �rapid graphical programming
environment’
WinIRIS Delphi project
WinISIS plugins
пЃ¬
пЃ¬
пЃ¬
WinISIS plug-in : executable softwares, inserted in
WinISIS-menu’s, knowing how to read the actual
database and configuration (PFT, record, IF etc.)
adding into menu (= database MSENDF.MST)
FreeText search[CALL freetext.exe]
will allow �FreeText’ plugin to be invoked from the menu
waiting for the specs (’API’)… still not officially released
Документ
Категория
Презентации
Просмотров
7
Размер файла
74 Кб
Теги
1/--страниц
Пожаловаться на содержимое документа