---------------------------------------------------------
The Liberty Basic Newsletter - Issue #32 - APR 99
"Knowledge is a gift we receive from others."
		- Michael T. Rankin
---------------------------------------------------------
In This Issue:

Programmer's Spotlight on Dean Hodgson

1.  Deanslib.DLL
2.  Dean's Life - in his own words:
3.  Summary of DEANSLIB.DLL functions
4.  See the attached JPG for a photo of Dean.
------------
News:  Brosco is back and ornery as ever!
------------
Coming soon:  debugging!
------------
Wanted:  Your Ideas!!!
---------------------------------------------------------
Programmer's Spotlight on Dean Hodgson

1.  Deanslib.DLL

Dean Hodgson is the author of Deanslib.dll, the most
useful and used add-on DLL for Liberty BASIC.  It
contains disk and file functions, font functions,
printer functions, date and time functions, general
Windows functions that allow you to create and use
custom controls, and miscellaneous functions such as
sound and mod.  All functions are listed at the end of
this newsletter.  In addition to being the most useful
DLL for LB, it is also the best documented!

It is available on Bearmate's site:
http://come.to/lbpro

If you appreciate Dean's contribution to Liberty BASIC,
why not send him a note telling him so, at:
dhodgson@nexus.edu.au


2.  Dean's Life - in his own words:
Here is the total Bio you asked for:
I currently live and work near Adelaide, South Australia. 
I am employed by the state government's education department 
(known as DETE and prounced -- wait for it -- 'det'). I am 
the manager of a very successful school library automation
system known as Book Mark. It is used by over 1800 schools 
and businesses in Australia and several other countries but 
not the U.S. or Canada or New Zealand. (yet!) Book Mark and 
ranks as the second most commonly used software of its type 
in schools in this country. I am also the project's dogsbody: I
wrote the software, the documentation, maintain it, make sure 
everything happens, do some support, training and promotion. 
Marion Mitchell is working with me in charge of user support. 
BookMark is currently a Dos program written in ZBasic but one 
Windows module has been produced and others will follow in
future. The databases are commonly 5 to over 20Mb in size with 
over 100 relational indexed files, all meant to be shared on 
networks. There is also a web search system 
(example at http://www.nexus.edu.au/bookmark/srchdemo.htm).

Prior to this, back in the 1980's, I worked for the Department's 
now-defunct curriculum computing agency writing classroom 
software on Commodore 64, Amstrad 6128 and PC machines. I have 
lost track of how many programs I have written and
published but it must be several dozen. Most were either 
databases, utility software or children's illustrated 
adventures. Popular titles included Granny's Garden, Jara Tava, 
The Lost World, Picture Book, Softword and Math Booster.
Even before that, while being a primary school teacher and 
deputy principal, I moonlighted by writing programs on the 
Tandy Color Computer & TRS-80-I and the Sega 8-bit computer. 
My programs were purchased and sold by Tandy Australia and
John Sands Electronics (pre 1985). In 1983-4, my Maths 
Invaders program was Tandy's #1 selling piece of software 
in Australia. Beside LB, I have worked with over 20 other 
dialects of Basic on quite a range of computers including
the above plus the Apple II, Microbee, Atari ST, Amiga, an 
HP 7830 desktop computer and the Mac. I have a nodding 
acquaintance with several other languages -- I used to write 
in assembler on the C64 (6502) and Amstrad (Z80) machines. 
I wrote a whole word processor for the C64 in 1985 (Softword) 
with only a monitor and a few good resource books. I have 
spent and wasted an unbelieveable amount of money and time 
researching languages for the PC. At the moment I am using 
Liberty Basic and GFA-Basic and still using ZBasic for Dos
jobs. I provided Brosco a bit of assistance when he 
developed DBDLL.

My initial dabbling with computers goes back to 1969 when I 
learned to write Fortran programs via punchcard using an 
IBM 1401 mainframe! I grew up north of Seattle in Edmonds, 
Washington and moved to Australia in 1974 when I was
offered a teaching position. I am an avid science fiction 
fan and have a very large book collection. I also have a 
long-held interest in astronautics and astronomy dating back 
to when I was a little kid in the years before before
Sputnik 1 (or so Mom says). I know the basic mathematics 
of orbital mechanics and rocketry, and I am a past secretary 
of the Adelaide chapter of the National Space Society. I can 
do table-top mass ratio calculations of manned spacecraft
configurations, for example. While at Uni, I used to run 
the planetarium at Western Washington State College in 
Bellingham. My first computer BASIC program was written 
on an 8-bit HP machine and simulated the formation of planets
around a G2 sun-type star. My second Basic program projected 
the future growth of human population, resource usage, 
living standards, etc, until 2100 (Limits to Growth model) 
and included space power supply. I am 47 and have four
children -- 2 from the first marriage who are now 25 and 
22 and two now aged 7 and 3. I don't feel old enough to be 
a grandfather but I am. Hardly any grey hairs! My wife is 
Australian but was born in England. She's a teacher, too.
---------------------------------------------------------------------------
Dean Hodgson
BookMark Project -- School Library Automation Software
Department of Education, Training and Employment  Adelaide, South Australia
email to:  dhodgson@nexus.edu.au
website:   http://www.nexus.edu.au/bookmark/
phone 0011-61-8-8226-1541  fax 0011-61-8-8410-2856
---------------------------------------------------------------------------

3.  SUMMARY OF DEANSLIB.DLL FUNCTIONS

This is a summary of all the functions in DEANSLIB.DLL. 
The format presented here is not what is entered in 
Liberty Basic but rather a simplistic representation. 
Variables are suffixed by symbols that mean:  
% (short), & (long), $ (string or ptr), ~(void). 
The last variable is the result.
________________________________________________
Function name    |   purpose      |    Variables
________________________________________________
Disk Functions:
Dshare	is share present?		%
Dopeni	open for input only	filenumber%, filename$, result%
Dopeno	open output only	filenumber%, filename$, result%
Dopenr	open random 	filenumber%, filename$, recordlength%, result%
Dseek	locate inside file	filenumber%, position&, result%
Dreadi	read short integer	filenumber%, result%
Dreadl	read long integer	filenumber%, result&
Dreads	read string	filenumber%, returnstring$, length%, result$%
Dwritei	write short integer	filenumber%, value%, result%
Dwritel	write long integer	filenumber%, value&, result%
Dwrites	write string	filenumber%, string$, length%, result%
Dinput	lineinput	filenumber%, returnstring$, result%
Dprint	sequential output	filenumber%, string$, result%
Dlock	record lock	filenumber%, position&, count&, result%
Dunlock	record unlock	filenumber%, position&, count&, result%
Dflush	flush disk buffer	filenumber%, result~
Dlockwait record lock waiting	filenumber%, position&, count&, result%
Dclose	close file	filenumber%, result%
lock	record lock for API	filehandle%, position&, count&, result%
unlock	record unlock for API	filehandle%, position&, count&, result%
Filehandle	return filehandle	filenumber%, result%
Chdrive	Change drive	drive%, result~
Path	Return current path	drive%, returnstring$, result%

Font Functions:
Cfont	Change font	handle%, parameter$, result fonthandle%
	parameter$ = fontname, width, height [,I] [,U] [,B1-9]
Freefont	Release font	fonthandle%, result~

Printer Functions:
PrinterDialog	Common printer dialog	handle%, result%
PrinterDc	Return printer DC	result%
Beginprint	Start printout	dc%, jobname$, result~
Lfont	Set font for printout	parameter$, result%
Ltext	Print text	x%, y%, text$, result~
LCircle	Print a circle	x%, y%, radiut%, result~
Lline	Draw a line	x1%, y1%, x2%, y2%, result~
Endprint	Finish printing	dc%, result~
PageFeed	Force a page feed	result~
AbortPrint	Cancel printjob	result~

Mouse Functions:
Hidemouse	Hides mouse cursor	result~
ShowMouse	Show the mouse if hidden	result~

Date and Time Functions:
SetDate	Set the date	date$, result~
	Date$ format is DD.MM.YYYY or MM/DD/YYYY
Settime	Set the time	time$, result~	time$=HH:MM:SS
Getdate	Return the date	mode%, returnstring$, result~
	Mode =0 gives DD.MM.YYYY and non 0 = MM/DD/YYYY.
Gettime	Return the time	returnstring$, result~

Miscellaneous Functions:
Bin	Return binary of value	value&, returnstring$, result%
Delay	Pause	value&, result~
Even	Is a value even?	value&, result%
Odd	Is a value odd?	value&, result%
Mod	Modulo calculation	value1&, value2&, result&
Invert	Invert colours	x%, y%, w%, h%, result~
Sound	Make sound	frequency&, duration&, result~

General Windows Functions:
SetWindowStyle	Change style	handle%, style&, result~
GetWindowStyle	Return style	handle%, result&
CreateWindow	Make an object	handle%, object$, title$, id%, x%, y%, w%, h%, style&, classstruct&, result%
object$ is a string with one of the following terms: BUTTON, COMBOBOX, EDIT, LISTBOX, SCROLLBAR or STATIC. Classstruct is usually 0.
CloseObject	Close an object	handle%, result~
RegisterClass	Registers a class	class%, result%
SetText	Sends text	handle%, text$, result~
GetTextLength	Returns text length	handle%, result%
GetText	Gets text	handle%, returnstring$, result%
SetFocus	Sets the focus	handle%

Editbox:
EditBox	Make an editbox	handle%, title$, id%, x%, y%, w%, h%, style&, result%
edcls	Clear text	handle%, result~
edgetmodify	Has been changed?	handle%, result%
edgetlinelength	Get length of line	handle%, linenumber%, result&
edgetline	Get line of text	handle%, linenumber%, returnstring$, result&
edgetlinecount	Get number of lines	handle%, result&
edgetselection	Get highlighted text	handle%, returnstring$, result%
edlimittext	Limit text entry	handle%, limit%, result~
edgetcursorposition	Return cursor pos.	handle%, result%
edsetcursorposition	Locate cursor	handle%, position%, result~

StaticText:
StaticText	Statictext display	handle%, title$, id%, x%, y%, w%, h%, style&, result%

Listbox:
ListBox	ListBox	handle%, title$, id%, x%, y%, w%, h%, style&, result%
lbselectstring	Highlight a string	handle%, selstr$, result%
lbselectindex	Highlight by index	handle%, index%, result~
lbselection	Return selected string  handle%, retstr$, result%
lbselectionindex	Return selected index  handle%, result%
lbfindstring	Find a string in list	handle%, s$, result%
lbgettext	Returns string from index	handle%, index%, restr$, result%
lbdelstring 	Delete an entry	handle%, index%, result%
lbaddstring	Adds a string	handle%, s$, result%
lbinsertstring	Insert a string	handle%, index%, s$, result~
lbdir 	Put directory in list	handle%, dir$, result%
lbgetcount	Number of entries	handle%, result%
lbgetsel	Has an entry been selected?  handle%, index%, result%
lbgettextlen	Entry length	handle%, index%, result%
lbsettopindex	Put entry to top	handle%, index%, result~
lbclear	Clear listbox	handle%, result~
lbsettabstops	Set up tab stops	handle%, s$, result~
lbload	Load array into list	handle%, s$, result%
lbgetmultilist	Get multiple entries	handle%, restr$, result%
SetDirList	Directory list special  whandle%, id%, path$, result~

Combobox:
ComboBox	Make a combobox	handle%, title$, id%, x%, y%, w%, h%, style&, result%
cbselectstring	Highlight a string	handle%, s$, result%
cbselectindex	Highlight an index	handle%, index%, result~
cbselection	Return editbox	handle%, restr$, result%
cbselectionindex	Return index	handle%, result%
cbload	Load array into list	handle%, s$, result%
cblbtoarray	Copy list to array	handle%, restr$, result%
cbgetlbtext	Return highlighted entry  handle%, index%, restr$, result%
cbfindstring	Find an entry	handle%, s$, result%
cbdelstring	Delete an entry	handle%, index%, result%
cbaddstring	Add an entry	handle%, s$, result%
cbinsertstring	Insert an entry	handle%, index%, s$, result~
cbdir	Put directory in list	handle%, dir$, result%
cbgetcount	Return number of entries  handle%, result%
cbgetlbtextlen	Return string length	handle%, index%, result%
cbclear	Clear contents	handle%, result~
cblimittext	Limit text entry	handle%, n%, result~
cbshowdropdown	Show/hide list	handle%, n%, result~
---------------------------------------------------------------------------
4.  See deanhson.jpg for a photo of Dean!
---------------------------------------------------------
 Newsletter compiled and edited by: Brosco and Alyce.
 Comments, requests or corrections: Hit 'REPLY' now!
---------------------------------------------------------