TweetFollow Us on Twitter

Pascal Arrives
Volume Number:1
Issue Number:1
Column Tag:Pascal ARRIVES

Pascal ARRIVES

By Chris Derossi

Well, after waiting and waiting and waiting, Macintosh Pascal has finally arrived, and with its arrival, Mac users now have a serious high-level language for programming on the Macintosh. This column will help the users of Macintosh Pascal both to learn about Mac Pascal, and to learn how the wonderous abilities of the Mac ROM can tie into Mac Pascal for creating powerful and useful programs.

For this opening column, we’ll be taking a general look at Pascal, and we’ll see how you can get started right away learning how to use your Pascal to the fullest. Let us start out by examining the contents of your Pascal package.

The documentation is in three separate parts, with each section contained in its own little booklet. The first, and smallest book contains the standard instructions for using the normal Macintosh User Interfaces, to which Mac Pascal conforms. For experienced users of the Mac, this book will be of very little help; you already know all about clicking, dragging, and editing with the mouse. For the less experienced user, this book will teach you what you need to know in order to get started with Pascal right away.

The most important part of this book is the section which describes the use of the Observe and Instant windows. This is the only explanantion of these windows found in the documentation. As we get further into Pascal, the importance of these windows will grow.

The booklet titled “Pascal Reference Manual” is an important tool for beginners and experienced programmers alike. Although it is not a tutorial, it does contain the entire syntax specification for Mac Pascal. Its primary use is as a look-up reference. New Pascal programmers may wish to go through the manual to get a general feel for the language, but as I’ll discuss shortly, more can be learned by studying the example programs supplied with Mac Pascal.

The final book, “Macintosh Technical Appendix”, is probably the most useful manual included. This manual describes the differences between Mac Pascal and both Lisa Pascal and ANS Pascal. In addition, this book has detailed information on two important areas of Mac Pascal: QuickDraw and SANE. Both of these will be covered in detail in further issues of MacTech.

Unfortunately, none of the documentation included with your Mac Pascal goes into any depth in the area of the Mac ROM, except for the QuickDraw section which is really more concerned with mathematical concepts. To learn about the language, and find out its limitations and its capabilities, we will be exploring a large variety of topics in this column. To begin with, however, a good source of information can be found in the example programs contained on your Pascal disk.

The Pascal disk contains a number of interesting programs that demonstrate some features of Mac Pascal. As you’ll notice, most of the examples contain graphics, but some of them display the ability of Mac Pascal to do things like change window size, modify the cursor, interact with the mouse and the keyboard, and perform file I/O. Indeed, Mac Pascal has a wide range of abilities. Although many of the procedures and functions used in the examples are not clear, browsing though the included examples is a good way to get a feel for the power of Mac Pascal, and an idea of the range of functions available.

The other item that is included with your Mac Pascal disk is a second Mac Pascal disk. This is an exact copy for backup purposes. The backup disk is included because Mac Pascal is copy protected. The diskette cannot be copied, and the Pascal file cannot be moved to any other disks, including hard disk drives. The files, on the other hand, can be moved and should be copied.

Now that we’ve examined the things that are contained in your Mac Pascal package, let’s say just a little bit about the interpreter itself. Before Mac Pascal, Pascal programs were compiled. That is, the Pascal program was written into a text editor. Then, the Pascal compiler read the program text and converted it to a form that the computer could execute. The machine executable version was called object code, and the original text version was called source code.

If a program was to be modified, the text of the program had to be changed, and then the whole thing had to be compiled again. This could take lots of valuable time. On the other hand, the object code, since it was usually directly executable by the computer, ran very quickly. Macintosh Pascal, however, is not compiled; Mac Pascal is interpreted.

When we say that Mac Pascal is interpreted, we mean that the program is enterred into a text editor which is part of the language interpreter. When the program is run, the interpreter reads the program and converts each line to an executable format. The individual lines are converted and run each time they are needed, and the converted lines are not kept available. This means that interpreted programs generally run slower than compiled programs. If the program is to be changed, though, it can be re-run immediately after modification. This decreases the amout of development time required .

In conclusion, Macintosh Pascal presents a useful and powerful programming environment for the Mac user. For the beginner, Pascal provides an excellent learning vessel, and for the experienced Mac user, Pascal provides a useable, structured interface to the internal magic of the Macintosh. This column will explore and enhance these qualities of Mac Pascal and will help you to better understand and take advantage of Mac Pascal.

program Benchmark;

{creative computing benchmark}

 type
  datetimerec = record
    year, month, day, hour, minute, second, dayofweek : integer
   end;

 var
  a, r, s : extended;
  i, n : integer;
  result1, result2 : extended;
  begintime : datetimerec;
  endtime : datetimerec;
  t1, t2 : longint;

begin   {of main program}

 gettime(begintime);
 for n := 1 to 100 do
  begin
    a := n;
   for i := 1 to 10 do
      begin
         a := sqrt(a);
         r := r + random
    end;
    for i := 1 to 10 do
      begin
        a := a * a;
         r := r + random
    end;
    s := s + a
  end;

 result1 := abs(1010 - s / 5);
 result2 := abs(1000 - r);
 gettime(endtime);
 t1 := begintime.hour * 3600 + begintime.minute * 60 +   begintime.second;
 t2 := endtime.hour * 3600 + endtime.minute * 60 +       endtime.second;
 writeln(‘time in seconds=’, t2 - t1);
 writeln(‘ accuracy=’, result1 : 20 : 18);
 writeln(‘ random=’, result2 : 20 : 18);

end.
 

Community Search:
MacTech Search:

Software Updates via MacUpdate

FileZilla 3.21.0 - Fast and reliable FTP...
FileZilla (ported from Windows) is a fast and reliable FTP client and server with lots of useful features and an intuitive interface. Version 3.21.0: Fixed Vulnerabilities Fixed a string format... Read more
EtreCheck 3.0.2 - For troubleshooting yo...
EtreCheck is an app that displays the important details of your system configuration and allow you to copy that information to the Clipboard. It is meant to be used with Apple Support Communities to... Read more
Microsoft Office 2016 15.25 - Popular pr...
Microsoft Office 2016 - Unmistakably Office, designed for Mac. The new versions of Word, Excel, PowerPoint, Outlook and OneNote provide the best of both worlds for Mac users - the familiar Office... Read more
Typinator 6.10 - Speedy and reliable tex...
Typinator turbo-charges your typing productivity. Type a little. Typinator does the rest. We've all faced projects that require repetitive typing tasks. With Typinator, you can store commonly used... Read more
The Hit List 1.1.26 - Advanced reminder...
The Hit List manages the daily chaos of your modern life. It's easy to learn - it's as easy as making lists. And it's powerful enough to let you plan, then forget, then act when the time is right.... Read more
Fantastical 2.2.5 - Create calendar even...
Fantastical 2 is the Mac calendar you'll actually enjoy using. Creating an event with Fantastical is quick, easy, and fun: Open Fantastical with a single click or keystroke Type in your event... Read more
Firefox 48.0.1 - Fast, safe Web browser.
Firefox offers a fast, safe Web browsing experience. Browse quickly, securely, and effortlessly. With its industry-leading features, Firefox is the choice of Web development professionals and casual... Read more
Adobe InDesign CC 2015 11.4.1.102 - Prof...
InDesign CC 2015 is available as part of Adobe Creative Cloud for as little as $19.99/month (or $9.99/month if you're a previous InDesign customer). Adobe InDesign CC 2015 is part of Creative Cloud.... Read more
Corel Painter 16.0.0.400 - $499.00
Corel Painter lets you advance your digital art style with painted textures, subtle glazing brushwork, interactive gradients, and realistic Natural-Media. Easily transition from traditional to... Read more
Thunderbird 45.2.0 - Email client from M...
As of July 2012, Thunderbird has transitioned to a new governance model, with new features being developed by the broader free software and open source community, and security fixes and improvements... Read more

What is Flip Diving, and why has it take...
Move over Pokemon GO. There's a new king in town, and it's "the world's #1 cliff diving game." [Read more] | Read more »
5 places where Pokemon GO is still numbe...
In the U.S., the bloom is off the Pokemon Go rose ever so slightly. It's still doing great, sitting atop the top grossing chart as it has for some time, but it's no longer among the top 10 free apps in downloads, possibly because darn near... | Read more »
Madden NFL Mobile: How defense has chang...
Saying that defense is not a priority in Madden NFL Mobile is a bit of an understatement. In asynchronous head-to-head play, you don't take control of your defenders at all, as the AI manages them while your opponent plays offense. When it's your... | Read more »
Feed Hawk (News)
Feed Hawk 1.0.1 Device: iOS Universal Category: News Price: $2.99, Version: 1.0.1 (iTunes) Description: Feed Hawk makes it easy to subscribe to the RSS feed of the website you are visiting. From within Safari, simply open a share... | Read more »
Reigns character guide: Who's who i...
Know your foes. Keep your friends close, but your enemies closer. And there are probably some other cliches that would apply to your perilous spot on the throne in Reigns as well. [Read more] | Read more »
Match 3 puzzler Small Lime is now availa...
Set to hit Android and IOS on the 17th August, Small Lime is the newest match 3 mobile game, and hopes to throw something a little different into the mix. If you love match 3 puzzles, but are tired of the same old ideas being re-hashed again and... | Read more »
Deus Ex GO tips, tricks, and hints
When Square Enix Montreal first hit us with Hitman GO,it was seen as a clever board game twist on a property that you wouldn't normally think would fit that kind of format. Lara Croft GOexpanded things even further while keeping some of the same... | Read more »
Leap of Fate (Games)
Leap of Fate 1.0 Device: iOS Universal Category: Games Price: $3.99, Version: 1.0 (iTunes) Description: *** Minimum hardware: iPad 4, iPad mini 2, iPhone 5s. *** | Read more »
Hero Generations (Games)
Hero Generations 1.0 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0 (iTunes) Description: Hero Generations is an innovative Roguelike/4X Strategy game where every turn is one year of your life. Praised as "the... | Read more »
Legend of the Skyfish (Games)
Legend of the Skyfish 1.02 Device: iOS Universal Category: Games Price: $3.99, Version: 1.02 (iTunes) Description: Legend of the Skyfish is a beautiful action adventure puzzle game with a unique weapon and tool - a fishing pole!... | Read more »

Price Scanner via MacPrices.net

Typinator 6.10 comes with 50 improvements – G...
Ergonis Software today announced release of Typinator 6.10, a new version of their text expander utility for macOS. Typinator 6.10 comes with 50 improvements, including new features, compatibility... Read more
Taxi Sim 2016 Puts Users Behind the Wheel in...
Ovilex Soft today announces Taxi Sim 2016, an update to their ultra-realistic 3D driving simulator app for iOS and Android devices — literally a global event what with the company’s nearly 450,000... Read more
11-inch 1.6GHz/128GB MacBook Air on sale for...
Amazon has the current-generation 11″ 1.6GHz/128GB MacBook Air (sku MJVM2LL/A) on sale for $788 for a limited time. Their price is $111 off MSRP, and it’s the lowest price available for this model. Read more
Apple refurbished Mac minis available for up...
Apple has Certified Refurbished Mac minis available starting at $419. Apple’s one-year warranty is included with each mini, and shipping is free: - 1.4GHz Mac mini: $419 $80 off MSRP - 2.6GHz Mac... Read more
Apple refurbished 13-inch Retina MacBook Pros...
Apple has Certified Refurbished 13″ Retina MacBook Pros available for up to $270 off the cost of new models. An Apple one-year warranty is included with each model, and shipping is free: - 13″ 2.7GHz... Read more
12-inch 32GB and 128GB WiFi iPad Pros on sale...
B&H Photo has 12″ 32GB & 128GB WiFi Apple iPad Pros on sale for up to $70 off MSRP, each including free shipping. B&H charges sales tax in NY only: - 12″ Space Gray 32GB WiFi iPad Pro: $... Read more
Apple refurbished 11-inch MacBook Airs availa...
Apple has Certified Refurbished 11″ MacBook Airs (the latest models), available for up to $170 off the cost of new models. An Apple one-year warranty is included with each MacBook, and shipping is... Read more
WaterField Launches Kickstarter for Intrepid...
San Francisco based WaterField Design have announced their first Kickstarter campaign for the one-of-a-kind Intrepid iPhone Travel Wallet. The all-new design includes iPhone play-through capability... Read more
Five of Top 10 Worldwide Mobile Phone Vendors...
Global sales of smartphones to end users totaled 344 million units in the second quarter of 2016, a 4.3 percent increase over the same period in 2015, according to Gartner, Inc. Overall sales of... Read more
DriveSavers Offers $300 Off Data Recovery Ser...
DriveSavers, with more than 30 years of experience recovering photos, videos, contact lists, financial records and other important data that may have been kept on devices damaged or even destroyed by... Read more

Jobs Board

*Apple* Retail - Multiple Positions Germanto...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* Professional Learning Specialist - A...
# Apple Professional Learning Specialist Job Number: 51234379 Portland, Maine, Maine, United States Posted: Aug. 18, 2016 Weekly Hours: 40.00 **Job Summary** The Read more
Lead *Apple* Solutions Consultant - Apple (...
# Lead Apple Solutions Consultant Job Number: 51218465 Richmond, VA, Virginia, United States Posted: Aug. 18, 2016 Weekly Hours: 40.00 **Job Summary** The Lead ASC Read more
*Apple* Solutions Consultant - Apple (United...
# Apple Solutions Consultant Job Number: 51218534 Pleasant Hill, California, United States Posted: Aug. 18, 2016 Weekly Hours: 40.00 **Job Summary** As an Apple Read more
*Apple* Retail - Multiple Positions Chestnut...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.