Scope of Procedures Follow-up





Thanks to everyone for the replies. I was very close (but not enough) to
the solution.

Still learning about classes, methods and all this OOP related stuff. But
I have got a lot done just from what I know about event driven programming
and lots of trial, error and reading other peoples code.

Now I've got that working, I can remove all that duplicate code !!

I'm just a hobby programmer, working on database type projects dating back
to Atari ST days. I started programming in the late 1980s with GFA Basic
on the Atari, a brilliant event driven programming language for the time.
It did something I have not seen since; it would 'fold' a procedure down
to a single line, very handy for quickly navigating around a large project.

Thanks to emulation (TOSBOX) I still have original code and a few things
almost 20 years old that still run. When I got a PC (about 10 years ago)
it was a second hand machine that previously ran a BBS. It was a dual boot
machine with Win 3.11 and OS/2 v3. After using both I found I preferred
OS/2, so my next PC was another dual boot machine with OS/2 version 4. I
started using Rexx (the built-in programming language), another very handy
language with a lot of neat string handling routines. With the addition of
VisPro Rexx I could write GUI programs and converted my Atari programs to
Rexx.

Unfortunately IBM (and everyone else) abandoned OS/2. So when I got a new
PC in August 2004 I had to make a decision regarding OS/2 and my
programming.

This was solved by getting Microsoft Virtual PC. Since then I have been
running OS/2 v4 under emulation and keeping my programs running. But I
knew I would eventually have to convert my stuff to something in a
Microsoft environment.

This appeared to be solved in August 2005 when Microsoft released their
latest 'free' variation of Visual Basic. I must have spend a week
downloading all the programs, signing up to everything necessary and
getting it installed.

Then I tried using it. By then I had acquired some programming experience,
but this was the biggest pile of smelly stuff I had come across. It was
full of all sorts of (IMHO) unnecessary garbage and frustrations.
Even how to get a 'Hello World' program working proved to be not at all
obvious.

So I went backwards. I had always thought (contrary to popular opinion at
work) that Excel v5 was the best version and subsequent editions just made
the programming more complicated and difficult. So I found a copy of the
previous version of Visual Basic (version 6?) and installed that. This was
easier, I could get basic programs working and the interface was
understandable and useable.

I had heard of Delphi and found a copy of version 6 on an old Australian PC
magazine. I now had the main competition lined up side by side. I tried
both and read all the online comparisons I could find. It was a bit
worrying that Visual Basic 6 code didn't appear to be immediately
upgrade-able to the .NET framework. But Delphi appeared to be OK. General
opinion appeared to favor Delphi and I could actually understand it.

So late last year I signed up to Delphi and Pascal 100%.
Visual Basic was unceremoniously dumped and I started a Delphi downloading
and buying binge. I got Marco Cantu's PDFs, found Delphi sites and started
buying books.

So far, http://www.delphibasics.co.uk/ proved to be the most helpful site.


Here in NZ we have TradeMe, our version of eBay. I got books from the 1980s
on Pascal for $10. Weighty technical manuals on Pascal programming and data
structures by Kruse, Nyhoff & Leestma. But the best I have found is -
'Programming & Problem Solving with Delphi' by Mitchell C Kerman
and
'Discover Delphi' by Williams & Walmsley.
The first appears to have been a standard text at one of our Universities.

I would disagree with O'Reilly that you can put Delphi in a nutshell,
and SAMS are lying if they think you can learn Delphi in 21 days
(OK, maybe if you spent 21 hours per day).

I even managed to get a the Personal Edition of Delphi version 7
(anyone got a really really cheap version of Delphi 2006 ?)

But I'm still looking for a cheap version of Marco Cantu's Mastering Delphi
7.

My main database has been converted to Delphi, now itʼs the long process of
getting rid of those little annoyances and the fixing the occasional error.
So far I have been able to convert my methods and techniques from the Atari
through to Delphi. A byte is still a byte, better sorting routines are
always better no matter what the operating system. And the searching
routine I came up with one Sunday afternoon in 1992 has been successfully
converted, although I now know itʼs called a ʽIndexed Sequential Searchʼ.

I have a collection of GUI & programming design articles I always go back
to on my web site:
http://nigelbaker.net/TYE/IDESIGN/IDESIGN.HTM

Until now I have been able to use my old ways and means in Delphi without
needing to go into the mind-warp of object orientated programming. But I
have recently discovered the benefits of TstringsList, with itʼs quick
loading, sorting and saving but find arrays starting with a zero value
annoying.
You count starting with 1 dammit, not 0 !!!

Some habits are hard to change, I still use I, J, K etc in FOR/NEXT loops,
a practice dating back to my first programming language, FORTRAN. And I
habitually break long functions into short ones, as in :

STR(NewFound, Q);
Q := Q + ' Items Found';
LabelTotal.Caption := Q;

To make finding errors easier.


So, are there any other Delphi users out there in Christchurch, New Zealand
???

Nigel Baker
http://nigelbaker.net/


.



Relevant Pages

  • Re: Discovering variable types...
    ... teaching people programming was why Pascal was created. ... I'll grant you that Delphi isn't nearly as useful without the VCL source. ... development by dragging components onto designers. ... robust, more expandable, and more maintainable, at the cost of linking ...
    (comp.lang.pascal.delphi.misc)
  • Re: So, is Delphi making serious inroads?
    ... fast way is not programming. ... OO language as well as SQL. ... >>> compared to Java, Delphi, PHP etc? ... > a programming language. ...
    (borland.public.delphi.non-technical)
  • Re: Cant pass dynamic arrays to procedure without EInvalidPointer exception
    ... IMO it is safer and easier to ask the Array for its dimensions ... Equations" app is actually a Delphi rewrite of an old ALGOL program ... strictly sequential Von Neumann programming, ... the really cool thing about ordinal types is that you can use ...
    (comp.lang.pascal.delphi.misc)
  • And now my thoughts on Delphis survival
    ... The first programming language I ordered was Turbo ... Had TP 1.0 been $1,200.00 I would probably not be a Delphi ... DevCo should bring back the Standard Edition ... the choice must be made between .NET and the new BASIC compiler, ...
    (borland.public.delphi.non-technical)
  • Re: The Great Debate V. What have changed ?
    ... Randalls AoA, until I discovered RosAsm. ... I programmed using the Delphi VCL for years. ... to insert a call to my own written memorymanager. ... To thoose with more than 5 years programming ...
    (alt.lang.asm)