Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 21, 2013, 07:11 AM   #1
green.apple
macrumors newbie
 
Join Date: Feb 2013
pascal programming

i would like to use pascal under mountain lion.in windows i used a program who looked like this.
http://progopedia.com/static/upload_.../12/07/tp7.png
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.
green.apple is offline   0 Reply With Quote
Old Feb 21, 2013, 08:00 AM   #2
benwiggy
macrumors 68020
 
Join Date: Jun 2012
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.)
benwiggy is offline   0 Reply With Quote
Old Feb 21, 2013, 10:21 AM   #3
ghellquist
macrumors regular
 
Join Date: Aug 2011
Location: Stockholm Sweden
Quote:
Originally Posted by green.apple View Post
i would like to use pascal under mountain lion.in windows i used a program who looked like this.
http://progopedia.com/static/upload_.../12/07/tp7.png
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
ghellquist is offline   1 Reply With Quote
Old Feb 21, 2013, 10:25 AM   #4
balamw
Moderator
 
balamw's Avatar
 
Join Date: Aug 2005
Location: New England, USA
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.

B
__________________
MBA (13" 1.7 GHz 128GB), UMBP (15" SD 2.8 GHz), UMB (13" 2.4 GHz), iMac (17" Yonah), 32GB iPad 3 WiFi+LTE, 64 GB iPad WiFi, 32 GB iPhone 5, Airport Extreme
balamw is offline   0 Reply With Quote
Old Feb 22, 2013, 07:01 AM   #5
green.apple
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
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..
green.apple is offline   0 Reply With Quote
Old Feb 22, 2013, 07:08 AM   #6
balamw
Moderator
 
balamw's Avatar
 
Join Date: Aug 2005
Location: New England, USA
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.

B
__________________
MBA (13" 1.7 GHz 128GB), UMBP (15" SD 2.8 GHz), UMB (13" 2.4 GHz), iMac (17" Yonah), 32GB iPad 3 WiFi+LTE, 64 GB iPad WiFi, 32 GB iPhone 5, Airport Extreme
balamw is offline   0 Reply With Quote
Old Feb 22, 2013, 08:33 AM   #7
green.apple
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
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:
begin
writeln ('hello');
end.
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.
green.apple is offline   0 Reply With Quote
Old Feb 22, 2013, 08:59 AM   #8
Ap0ks
macrumors regular
 
Join Date: Aug 2008
Location: Cambridge, UK
If you wanted it to be the same as at school, you could always see if Turbo Pascal would run in DOSbox or Boxer.
Ap0ks is offline   0 Reply With Quote
Old Feb 22, 2013, 02:34 PM   #9
larswik
macrumors 65816
 
Join Date: Sep 2006
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.
__________________
I know more than yesterday.
Lars
larswik is offline   0 Reply With Quote
Old Feb 22, 2013, 02:38 PM   #10
ratfink
macrumors member
 
Join Date: Feb 2012
I wonder if Turbo Pascal would run under DosBox. You should give that a try.

edit: according to the link below, it runs fine.

http://fuyichin.blogspot.com/2008/04...on-dosbox.html
ratfink is offline   0 Reply With Quote
Old Feb 22, 2013, 03:42 PM   #11
certsoft
macrumors member
 
Join Date: Sep 2007
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.
certsoft is offline   0 Reply With Quote
Old Feb 23, 2013, 07:11 AM   #12
green.apple
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
there isn' any native program?
green.apple is offline   0 Reply With Quote
Old Feb 23, 2013, 07:15 AM   #13
balamw
Moderator
 
balamw's Avatar
 
Join Date: Aug 2005
Location: New England, USA
Quote:
Originally Posted by green.apple View Post
there isn' any native program?
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?

B
__________________
MBA (13" 1.7 GHz 128GB), UMBP (15" SD 2.8 GHz), UMB (13" 2.4 GHz), iMac (17" Yonah), 32GB iPad 3 WiFi+LTE, 64 GB iPad WiFi, 32 GB iPhone 5, Airport Extreme
balamw is offline   0 Reply With Quote
Old Feb 23, 2013, 07:24 AM   #14
mamcx
macrumors regular
 
Join Date: Mar 2008
FreePascal work fine in OSX. Lazarus work too, but is the "weak" link. I have used it before. Check this wiki:

http://wiki.freepascal.org/Installin...rus_on_MacOS_X


And pay attention to the details.
__________________
BestSeller Mobile Salesforce for the iPhone.
Follow on Twitter (Spanish/English).
mamcx is offline   0 Reply With Quote
Old Feb 25, 2013, 10:38 AM   #15
eharley
macrumors newbie
 
Join Date: Dec 2007
You could just use TurboPascal in DOSBox

http://fuyichin.blogspot.com/2008/04...on-dosbox.html
eharley is offline   1 Reply With Quote
Old Feb 25, 2013, 06:42 PM   #16
MisterMe
macrumors G4
 
Join Date: Jul 2002
Location: USA
Quote:
Originally Posted by green.apple View Post
i would like to use pascal under mountain lion.in windows i used a program who looked like this.
http://progopedia.com/static/upload_.../12/07/tp7.png
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.
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.
__________________
Neither a borrower nor a lender be
For loan oft loses both itself and friend
William Shakespeare from Hamlet
MisterMe is offline   0 Reply With Quote
Old Feb 26, 2013, 03:06 AM   #17
green.apple
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
no,it's not the case.i need same compiler with that.why wouldn't lazarus do the trick?
green.apple is offline   0 Reply With Quote
Old Feb 26, 2013, 04:24 AM   #18
knightlie
macrumors 6502a
 
Join Date: Feb 2008
It looks like Ebarcadero will let you download Turbo Pascal 5.5: http://edn.embarcadero.com/article/20803 This may run under Wine, or DOSBox.

Man, do I miss Turbo Pascal... :-(
__________________
2011 Mac Mini i5 | iPad Mini | Wife | Cat
knightlie is offline   0 Reply With Quote
Old Feb 26, 2013, 11:21 PM   #19
kaydell.leavitt
macrumors regular
 
Join Date: Apr 2010
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.
kaydell.leavitt is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Pascal Cagni: avoid the decay and downfall of the Apple empire gto55 Apple, Industry and Internet Discussion 0 Nov 19, 2012 04:44 AM

Forum Jump

All times are GMT -5. The time now is 05:10 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC