1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

pascal programming

Discussion in 'Mac Programming' started by green.apple, Feb 21, 2013.

  1. macrumors newbie

    i would like to use pascal under mountain lion.in windows i used a program who looked like this.
    i tryed lazarus(installed xcode,fpc ,fpc sources) and still dosen't work propertly for me.what should i use?or,how do i make it work? or what other similar programs are for pascal?
    i'm using mountain lion 10.8.2.
  2. macrumors 68020

    Exactly how are you intending to use your Pascal code? Are you wanting to write Mac programs?
    Or is this just within a "platform-free" closed environment? That image you posted looks like an ancient DOS-based Pascal program. What sort of programs are you intending to write?

    Pascal is a fairly dead language these days. While parts of the original Mac OS were written in Pascal, this is all gone, and there are only a few quirks that remain from its legacy.

    However, a quick Google for "Mac Pascal" reveals several free implementations.

    You might be better served learning a language like Objective-C, Python, Ruby or even Unix shell-scripting, which are more useful for creating useful code on modern computer systems. (I say this as someone who learnt Pascal at University.)
  3. macrumors regular

    Aaahh. Turbo Pascal on Dos. Those were the days! Long time gone though.

    As already said, Pascal is more or less dead now. So if you want to program "useful" things there are better choices of program language. Of course, if you want to rerun som old programs or simply dust off some old knowledge it can be a good choice.

    // gunnar
  4. Moderator


    Staff Member

    One user here took a Pascal course recently in community college.

    More about this here: Pascal Programming.

    You may not easily find an IDE like Turbo Pascal for the Mac.

  5. macrumors newbie

    i need pascal for school.i need to run it ,so i can learn something.it's not a programming language of my choice.i'd go for python or c instead,but it isn't my choice.i need to use pascal.there's any way? i searched and readed a lot.
    i don't wanna convert from c code to pascal or other things..
  6. Moderator


    Staff Member

    Since you claim you already tried fpc have you tried GNU pascal?

    Also how exactly did Lazarus/fpc not do the job for you? http://whathaveyoutried.com

    Since it's needed for school, what is the school working on? Are they seriously working Turbo Pascal in DOS? (IIRC larswik's course was using a TPC book with some pascal under linux).

    If they have it working under linux set up a VM and use what they have.

  7. macrumors newbie

    yes,we're using windows xp.for that.this is programming basics.that's teaching in school.i want to be able to do my homework,and study aswell.i have a apple laptop,can't install windows on it(or linux for that matter)i want to run it in mountain lion.. don't wanna get complicated with virtual machine or something...a simple program like, hello program,it dosen't work.
    something like this:
    writeln ('hello');
    this is the simplest program i know and dosen't work...
    i installed xcode,lazarus,fpc,fpc docs,etc...tryed evan code:blocks...still ain't working.
  8. macrumors regular

    If you wanted it to be the same as at school, you could always see if Turbo Pascal would run in DOSbox or Boxer.
  9. macrumors 65816

    I had to do the something a few years ago when I started school. I installed on my Mac http://www.ubuntu.com/ operating system. I then installed somethinf like Free Pascal and it worked like a charm. Look at this link http://fusharblog.com/installing-free-pascal-in-ubuntu/

    Pascal is pretty useless in the real world today but it is great to learn and you will take all the principles you learn to other languages.
  10. macrumors member

  11. macrumors member

    I've run Borland Pascal 7 using a program called "Boxer" in the past for updates to an old (turn of the century) product.

    Pascal is not useless, it's more advanced version Object Pascal is the basis of Delphi which many people use all over the world.

    When I got a new MacbookPro earlier this year I installed Lazarus on it and it worked fine (as long as don't mind bloated executables). I've never tried just using FPC by itself. I have some Delphi programs that are console programs (so simple stuff like hello world will work) but I've never tried to make a console program under Lazarus.
  12. macrumors newbie

    there isn' any native program?
  13. Moderator


    Staff Member

    You still haven't given us any more information other than "dosen't work propertly for me". What exactly doesn't work? How does it fail?

  14. macrumors regular

  15. macrumors newbie

  16. macrumors G4

    You are not taking Pascal to learn programming. You are taking Pascal for a grade on your transcript. This being the case, you need a compiler at home on which you can complete your homework. If you are running Turbo Pascal on your Windows computer at school, then you need to run Turbo Pascal from the MS-DOS command line on either a Windows computer or virtual environment.

    Here is the problem. There were published Pascal standards. However, few of the popular Pascal compilers complied with them. Turbo Pascal was among the least standards-compliant compilers extant. If your teacher is using Turbo Pascal, then you can bet that he/she expects your assignments to be completed in Turbo Pascal. He/She has to grade your work as well as the work of every other student in your class. If the teacher is willing to grade submitted assignments that have been coded for each student's choice of compiler, then more power to him/her. Somehow, I don't think that this is the case.
  17. macrumors newbie

    no,it's not the case.i need same compiler with that.why wouldn't lazarus do the trick?
  18. macrumors 6502a

  19. macrumors regular

    Gnu Pascal Should Work From the Mac's Command-Line

    I'm using Gnu Pascal from the Mac OS X command-line. You can edit files with your favorite Mac text editor (such as TextWrangler).

    You can google for "Gnu Pascal Download". It will run under Mac OS X without doing something weird that makes you run Windows under Mac.

    And you can google for "Text Wrangler Download"

    Both Gnu Pascal and Text Wrangler are totally free.

    Pascal isn't a bad first language to learn. That's what it was designed for was to teach student's how to program. But, yeah, for serious programming of a Mac, Objective-C is the best.

Share This Page