• Learning Pascal

    From Darryl Dunnaway@1:396/75 to All on Thursday, July 15, 2010 15:39:17
    I just bought 4 different books on pascal off of Amazon the other day so I could learn this language. I've been playing around with FreePascal and
    trying out a few things. So far it doesn't seem to be all that difficult. Anyone got any major pointers on what I need to learn to write a few simple windows programs?

    Other than the traditional:

    program hello;

    begin
    println ('Hello World');
    end.

    Thanks!

    Darryl
    --- SBBSecho 2.12-Win32
    * Origin: ION BBS - telnet://ionbbs.com (1:396/75)
  • From John Guillory@1:396/60 to Darryl Dunnaway on Thursday, July 15, 2010 19:42:52
    Re: Learning Pascal
    By: Darryl Dunnaway to All on Thu Jul 15 2010 03:39 pm

    I just bought 4 different books on pascal off of Amazon the other day so I could learn this language. I've been playing around with FreePascal and trying out a few things. So far it doesn't seem to be all that difficult. Anyone got any major pointers on what I need to learn to write a few simple
    If you have any kind of programming experience I can probably help you do
    about anything you need to do as long as you stick to either Turbo Pascal
    or Delphi Syntax. Virtual Pascal preferred as it's my main squeeze. ;-)
    I've personally got TMT Pascal + 3.x, I used to have Quick Pascal, I have Stony Brook Pascal+ availablet, but haven't used it in ages. (cool in the dos days!), various free versions of turbo pascal, free pascal, etc. But if you want to get technical on ANSI standard pascal, forgetit! I know very little on the details of that....

    windows programs?
    If your doing console programs or using the graph unit to do graphics on
    windows, etc. cool. If your doing the windowproc method, find someone else!
    I've got samples I can dig up for win16, you may find samples in free
    pascal, but beyond that I'm not your person... Not my cup of tea!

    Other than the traditional:
    program hello;

    begin
    println ('Hello World');
    end.
    Thanks!

    If you stick to console mode, you can do a lot of powerful things in pascal. Depending on your flavor of pascal also depends on how well you can interface with other languages. If you use Virtual Pascal and use VPSysLow for your main file i/o stuff, rather than the dos unit, you have added ability to write programs that are OS/2, Windows, and Linux compatible with a single source code....

    But what are you looking to do? Good to see some fresh ideas here....
    --- SBBSecho 2.12-Win32
    * Origin: Roach Guts BBS telnet://roachguts.com 337-433-4135 (1:396/60)
  • From Darryl Dunnaway@1:396/75 to John Guillory on Thursday, July 15, 2010 23:12:05
    Re: Learning Pascal
    By: John Guillory to Darryl Dunnaway on Thu Jul 15 2010 07:42 pm

    I just bought 4 different books on pascal off of Amazon the other day so could learn this language. I've been playing around with FreePascal and trying out a few things. So far it doesn't seem to be all that difficult Anyone got any major pointers on what I need to learn to write a few simp
    If you have any kind of programming experience I can probably help you do
    about anything you need to do as long as you stick to either Turbo Pascal
    or Delphi Syntax. Virtual Pascal preferred as it's my main squeeze. ;-)

    I've been playing with FreePascal with both the console IDE and the Lazarus windows IDE.

    windows programs?
    If your doing console programs or using the graph unit to do graphics on
    windows, etc. cool. If your doing the windowproc method, find someone el
    I've got samples I can dig up for win16, you may find samples in free
    pascal, but beyond that I'm not your person... Not my cup of tea!

    I'll most probably be doing strictly console work until I get a good grasp of the language. Then I'm looking at writing a couple of small apps for myself. As I come up with ideas for apps I write them down. Most of them would be small, specific, and most likely do one thing only, but do it fast and well.

    If you stick to console mode, you can do a lot of powerful things in pascal. Depending on your flavor of pascal also depends on how well you can interfac with other languages. If you use Virtual Pascal and use VPSysLow for your m file i/o stuff, rather than the dos unit, you have added ability to write programs that are OS/2, Windows, and Linux compatible with a single source code....

    FreePascal has that same portability. It's one of the reasons I chose it to work with. Write once, compile for many.

    But what are you looking to do? Good to see some fresh ideas here....

    I've got several things that I want to do, but first I need to learn the language. Like I stated earlier, I've been playing with it, done a couple of tutorials I found on the net, and I'll be reading the books I purchased just
    as soon as they get here.

    I figure I'll start with the easy stuff first, like the Hello World example I gave and then move on into the more "dramatic" stuff like the Windows API as
    I gain knowledge and practice.

    It's been years since I really looked at any code other than PHP, but so far I've been able to follow it. I'm looking forward to it.

    **On a side note**

    My wife thinks I'm nuts, called me a geek (normal), and rolled her eyes (also normal). So I wrote her a little program that printed the sentence:

    "I may be a geek, but you married me."

    ...about 10,000 times. :)

    I can't figure out why she changed her mind and called me a nerd.

    LOL

    Darryl
    --- SBBSecho 2.12-Win32
    * Origin: ION BBS - telnet://ionbbs.com (1:396/75)
  • From John Guillory@1:396/60 to Darryl Dunnaway on Sunday, July 18, 2010 17:04:17
    Re: Learning Pascal
    By: Darryl Dunnaway to John Guillory on Thu Jul 15 2010 11:12 pm

    FreePascal has that same portability. It's one of the reasons I chose it to work with. Write once, compile for many.
    Yeah, I've played with Free Pascal a little, never really looked at Lazarus.

    Some things I like about pascal is the flexibility to do nearly anything and yet still not demand case sensitivity and other quirks.... Various dialects will do C style strings and things for you automatically.... Here's a few things to get you started....

    (untested)

    Program demo;
    Type MyRec = Record
    Case B : Byte of
    0 : Begin
    Byt : Array [0 .. 3] OF Byte;
    end;
    1 : Begin
    W : Array [0 .. 1] of Word;
    end;
    2 : Begin
    L : LongInt;
    End;
    3 : S : String[3];
    4 : C : Array [0 .. 3] OF Char;
    End;
    end;
    VAR
    A : MyRec;

    Begin
    A.W[0] := 1;
    A.W[1] := 2;
    WriteLn('Longint is ',A.L);
    WriteLn('String is ',A.S);
    A.S := 'ABC';
    WriteLn('LongInt is ',A.L);
    END.

    Kinda like Unions in C if you've ever done that....

    Another cool thing is text filters, but I'd have to dig up some reading on that....
    --- SBBSecho 2.12-Win32
    * Origin: Roach Guts BBS telnet://roachguts.com 337-433-4135 (1:396/60)
  • From mark lewis@1:3634/12 to Darryl Dunnaway on Tuesday, July 20, 2010 19:11:48

    I just bought 4 different books on pascal off of Amazon the other
    day so I could learn this language. I've been playing around with FreePascal and trying out a few things. So far it doesn't seem to
    be all that difficult. Anyone got any major pointers on what I
    need to learn to write a few simple windows programs?

    if you are going to do windows programs and you have freepascal, i'd recommend Lazarus, as well... lazarus is the GUI programing IDE... it is also multiplatform so that you can compile for windows, *nix, mac and other GUI environments...

    lazarus is pretty much delphi compatible... look it up and give it a try... it is a lot different than using a text editor and coding everything... you grab a
    component and drop it on your GUI form and can then modify its code if needed...

    )\/(ark


    * Origin: (1:3634/12)