Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: Delphi equivalent in the C world or Scheme/LISP world

Reply
Thread Tools

Re: Delphi equivalent in the C world or Scheme/LISP world

 
 
Hans-Peter Diettrich
Guest
Posts: n/a
 
      08-21-2008
http://www.velocityreviews.com/forums/(E-Mail Removed) schrieb:

> This was a nice reply where you tried to explain some special aspects
> of delphi
> based on the techniques of compiling and cross compiling them.
> Therefore I have
> confidence that this explanation can be expanded a little and made
> more lucid
> for a newbie like me by putting in more details into a single self-
> contained
> account.


So much more could be said, depending on what exactly you want to do.

>> Most GUI development environments are based on specific graphics
>> libraries. TheDelphiVCL (Visual Component Library) was developed for
>> Windows GDI, then converted into CLX (AFAIR based on Qt), and FreePascal
>> has implemented a true platform independent FCL (Free Component
>> Library), that is fully compatible with the VCL. The whole VCL/FCL is
>> written inDelphi(OPL), so that it can be used only with compilers that
>> can use theDelphiobject model. The RAD Studio, now sold by
>> Embarcadero, includes such compilers forDelphi,Delphi.NET, C++ and C#,
>> where for C# the VCL has been ported to .NET, so that it also can be
>> used with every .NET language.

>
> I am surprised that C/C++/C# people and gnu people have not done this
> since even
> unix and X windows are written in these languages and also the
> microsoft
> windows.


Most companies and GNU groups concentrate on their own goals, and do not
cooperate much with each other. The .NET approach lacks compatibility
with existing code and languages, and the users have to follow every
change in the proprietary Microsoft libraries. The GNU activities
traditionally solve portability problems by adding tools, like automake,
that introduce new problems, which have to be fixed by even more tools.
When I asked them for cooperation in the design and implementation of a
new model, for managing and building platform independent libraries and
programs, the only answer was "make it work yourself, then we'll
see...". The consequence is, that more and more people use interpreted
languages in the POSIX world, where only the interpreter has to be
ported once to every platform.


>> but since
>> I came acrossDelphi, now I write everything inDelphimyself, and only
>> "package" existing C code for use in myDelphicode.

>
> How do you call or package C code inside delphi ?


Delphi has a package concept, similar to the .NET assemblies, that
allows to make and use packages regardless of programming languages.
Well, not really *all* languages, but all those that can use external
binary libraries (*.DLL, *.so).

Thus making a package is not very different from making a DLL. And like
in making an ActiveX DLL, you have to #include the according header
files in your C code, to make sure that the package itself, and all
users of that package, will use the very same type definitions and
runtime library. Of course C and Delphi have different opinions, about
how a "header" file should look like. Therefore tools exist to convert C
header files from or into Delphi interface units, which may be invoked
automatically in a newer IDE. Note that IDE stands for Integrated
Development Environment, which integrates compilers for multiple
languages, and knows how to make accessible modules of one language in
the other languages


> What is the best book to read for a newbie on delphi and what is the
> software needed to practice as you read ? This would help me a lot
> since
> i have to learn by myself.


I cannot suggest any current literature, because I had to buy my last
book many years ago.

> I also dont know if any schools in the US
> teach programming via delphi. All I ever heard was scheme and python
> these days.


As mentioned above, only few languages are so platform independent that
they can be used in teaching programming in general. As a Windows user,
you may not have noticed that you'll have to tweak your C code for use
on every other platform. Teaching C effectively means teaching "how to
use C on platform XYZ", and that's why platform independent languages
are preferred in education.

Even if Delphi currently is bound to Windows, I've emphasized the easy
use of Delphi code on many other platforms, by simply using the
FreePascal compiler. Did you know that FPC can cross-compile your
Windows programs even for exotic machines, like ole Amiga or Atari?

DoDi
 
Reply With Quote
 
 
 
 
gnuist006@gmail.com
Guest
Posts: n/a
 
      08-21-2008


> > What is the best book to read for a newbie ondelphiand what is the
> > software needed to practice as you read ? This would help me a lot
> > since
> > i have to learn by myself.

>
> I cannot suggest any current literature, because I had to buy my last
> book many years ago.


Just tell me the good book, current or out of print, i dont care. but
it got to be a good one, so if necessary, i may photocopy after
getting permission from publisher.

Take a look at this site:
http://www.delphibasics.co.uk/

It has good colors but I cant understand my first program in detail. I
hated the same thing about java 10yrs ago i took got A and forgot coz
i never used again. now i have to write programs and learn delphi. Are
there any better sites for learning till the book arrives ?

 
Reply With Quote
 
 
 
 
Hans-Peter Diettrich
Guest
Posts: n/a
 
      08-22-2008
(E-Mail Removed) schrieb:

> Take a look at this site:
> http://www.delphibasics.co.uk/
>
> It has good colors but I cant understand my first program in detail.


If you mean the "first program" sample, the only line of "your" program
sits in the Button1Click procedure. That procedure, and all the other
stuff in the TForm1 class, is managed and updated by the IDE. Don't
worry about it, for now.

BTW, you should have some Delphi version running, so that you can
explore everything yourself. If not, get Lazarus
<www.lazarus.freepascal.org> for an free Delphi clone, with very similar
behaviour.

When you never wrote a GUI program yourself, you may wonder how and when
any of the procedures are ever called. Then open the Object Inspector,
select one of the components on your form, and look at the Events page
of that component. For every user action, on a menu, button or other
control, you can create an event handler procedure, that is invoked when
the user clicks on the component, or does something else with it. In the
Button1 event properties, you'll find Button1Click attached to the
OnClick event. You can remove that relationship, by simply erasing the
text in that field. Enter an different name, and upon hitting Enter the
IDE will create the skeleton for your new event handler, in the unit of
your form. If you want to use another, already existing event handler,
select it from the drop-down list of the event property. When that list
is empty, no handler with the required signature (parameters...) exists
in your code.

DoDi
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COM reference problem in Delphi 2005 =?Utf-8?B?R0c=?= ASP .Net 1 11-14-2005 10:43 PM
Delphi and Dotnet F. S ASP .Net 2 11-04-2005 04:04 PM
Newbie: Python equivalent to Delphi TTable Ashley Lloyd Python 1 01-07-2004 08:27 PM



Advertisments