Board index » delphi » Switching from C to PASCAL questions...

Switching from C to PASCAL questions...

     After checking out DELPHI for sometime now, I have decided to go that
way instead of BC++ 4.5 w/DataBase Tools.  I have been programming in the DOS
environment for sometime using C and C++.  Moving to the WINDOWS environment
was a Major Headache.  After checking out DELPHI, I found I can pretty much
save myself the trouble of trying to become an API expert.  I am going to
continue to write programs for DOS, but wish to do so using PASCAL, as a
learning experience to better prepare myself for DELPHI.  DOS programming
is pretty easy using C/C++.  I bought Turbo PASCAL 7.0 which seems to be the
current version.  I have the book "Mastering Turbo PASCAL 6.0" which a friend
gave me to help me get started.  I went through the first four chapters last
night and it was a breeze.  I like this language alot so far.  I am going
to continue tonight.  Using C for so long, it all snaps into place pretty
easily. I have a couple of questions about TP 7.0...

In this book, there is a chapter on OOP using TP 6.0, For those of you who
know, will all this apply to 7.0 and are there any major changes in OOP
implemetations in 7.0?

Also, there is a chapter on Turbo Vision.  TP 7.0 came with TV 2.0.  Is this
the same version that was available with TP 6.0?  

                Thanx in adv...

                                Dave - rept...@earthlink.net

 

Re:Switching from C to PASCAL questions...


In article: <47co1d$...@mars.earthlink.net>  r...@planetx.com (Reptile) writes:

Quote
>In this book, there is a chapter on OOP using TP 6.0, For those of you who
>know, will all this apply to 7.0 and are there any major changes in OOP
>implemetations in 7.0?

No. A new reserved word "inhereted" is available to allow objects to call their
parents method without having to worry about who the parent actually is. The
following two code snippets are equivalent:

With TP6
========

constructor TStaticText.Init(var Bounds: TRect; AText: String);
begin
  TView.Init(Bounds);
  .
  .
end;

With TP7
========

constructor TStaticText.Init(var Bounds: TRect; AText: String);
begin
  inherited Init(Bounds);
  .
  .
end;

There may be other minor additions, but as in the example above, nothing you
have to use or change if you don't want to.

Quote
>Also, there is a chapter on Turbo Vision.  TP 7.0 came with TV 2.0.  Is this
>the same version that was available with TP 6.0?  

No. That was TV1.0  TV2.0, like the language itself has had a few more bells and
whistles added.  TV2.0 will is upwards compatible, it will even load TV1.0
objects from resorce files.

-- Jay

 ------------------------------------------------
| Jason Burgon    EMail ja...@jayman.demon.co.uk |
 ------------------------------------------------

Re:Switching from C to PASCAL questions...


Jekki!

 r> In this book, there is a chapter on OOP using TP 6.0, For
 r> those of you who know, will all this apply to 7.0 and are
 r> there any major changes in OOP implemetations in 7.0?

All TP6 oop programs will work under TP7

 r> Also, there is a chapter on Turbo Vision.  TP 7.0 came with
 r> TV 2.0.  Is this the same version that was available with TP
 r> 6.0?  

Tp6 uses tv1.0
But there are only additions from tv1 to tv2.

             mbm
UP THE IRONS!

Other Threads