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 23, 2011, 10:02 AM   #1
dbergrude
macrumors newbie
 
Join Date: Feb 2011
Pascal Programming

I have an old Pascal basketball stats program that I would like to convert to run in OS X. Its a quick and easy program that works great. Only problem is we have to use old equipment to run it. An emulator would also work, but I need to be able to print from it. Any help or suggestions any of you could provide I would greatly appreciate it. Thanks
dbergrude is offline   0 Reply With Quote
Old Feb 23, 2011, 10:05 AM   #2
balamw
Moderator
 
balamw's Avatar
 
Join Date: Aug 2005
Location: New England, USA
Quote:
Originally Posted by dbergrude View Post
I have an old Pascal basketball stats program that I would like to convert to run in OS X. Its a quick and easy program that works great. Only problem is we have to use old equipment to run it. An emulator would also work, but I need to be able to print from it. Any help or suggestions any of you could provide I would greatly appreciate it. Thanks
One of our users (larswik) has actually been taking a Pascal course recently and using his Mac to write the code. There are two Pascal compilers for the Mac that you could consider. GNU Pascal and Free Pascal.

Does the app have a GUI or is it console/text based?

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, 2011, 02:37 PM   #3
dbergrude
Thread Starter
macrumors newbie
 
Join Date: Feb 2011
Its console/text based. All the code entered is 3 digits. If player number 10 scores a 2 pointer its 210, a 3 pointer its 310, if he/she misses its s10. For rebounds its d10 for defensive and r10 for offensive and so on. All players are entered into a team file and you don't have to worry about substitutes either. The great thing is that you don't have to look down to key in the event. So many of the new programs you have to look down and there is too many clicks. We tried one for the iPad and found ourself cheating off of the old system to keep up.

Thanks for your help.
dbergrude is offline   0 Reply With Quote
Old Feb 23, 2011, 04:04 PM   #4
balamw
Moderator
 
balamw's Avatar
 
Join Date: Aug 2005
Location: New England, USA
Quote:
Originally Posted by dbergrude View Post
Its console/text based.
So definitely take a look at the larswik Pascal threads. There are plenty of links and instructions there to get you started if you are running into any issues.

Another option, that wasn't right for larswik would be to use p2c to translate your Pascal source to C and maintain that translated code instead.

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, 2011, 06:47 PM   #5
Bill McEnaney
macrumors 6502
 
Join Date: Apr 2010
Quote:
Originally Posted by balamw View Post
Another option, that wasn't right for larswik would be to use p2c to translate your Pascal source to C and maintain that translated code instead.
Sometimes, when I've used p2c, I've needed to revise the C programs my Sun box wrote with it. The changes have been minor,though. For example, I've had to to replace the main() function's arguments with "void".
Bill McEnaney is offline   0 Reply With Quote
Old Feb 23, 2011, 06:58 PM   #6
balamw
Moderator
 
balamw's Avatar
 
Join Date: Aug 2005
Location: New England, USA
Quote:
Originally Posted by Bill McEnaney View Post
Sometimes, when I've used p2c, I've needed to revise the C programs my Sun box wrote with it. The changes have been minor,though. For example, I've had to to replace the main() function's arguments with "void".
Yeah, that's part of what I was referring to as maintenance.

The advantage is you get C code out of it which would be easier to compile on random platforms.

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, 2011, 11:53 PM   #7
Bill McEnaney
macrumors 6502
 
Join Date: Apr 2010
Quote:
Originally Posted by balamw View Post
Yeah, that's part of what I was referring to as maintenance.

The advantage is you get C code out of it which would be easier to compile on random platforms.

B
On the other hand, I think splint made the Sun machine complain about some C statements it wrote with p2c. It's probably safe to ignore the complaints, though.

By the way, to get splint, a more sophisticated version of Unix's lint command, you need to build it first. It's worth the effort because it'll tell your computer how to find memory leaks, unreachable code, and maybe even an infinite. But run splint on its own source code, and the computer will find something to yell about. Ironic?
Bill McEnaney 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

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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Do you need to know programming to make a informational app for the iPhone? cootersgarage6 Mac Basics and Help 1 Jan 28, 2011 08:44 PM
What is the easiest language to program in for iPhone apps? cootersgarage6 iPhone and iPod touch Apps 1 Jan 28, 2011 03:40 PM
Helpful DOS Programs, Anyone? Corbin052198 Community Discussion 4 Nov 24, 2010 04:12 PM
Program Files??? x11??? thepinknoodle Mac Basics and Help 3 Nov 12, 2010 05:16 PM


All times are GMT -5. The time now is 11:56 PM.

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

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