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

Trend Micro 11.0.2062 - An essential sec...
Trend Micro Antivirus provides essential security for macOS with real-time malware detection and mitigation in an affordable solution with a simple, intuitive interface. However, be aware that more... Read more
Backblaze 7.0.2.490 - Online backup serv...
Backblaze is an online backup service designed from the ground-up for the Mac. With unlimited storage available for $6 per month, as well as a free 15-day trial, peace of mind is within reach with... Read more
Pro Video Formats 2.2.1 - Updates for pr...
Pro Video Formats includes support for the following professional video codecs: Apple Intermediate Codec Apple ProRes AVC-Intra 50 / 100 / 200 / 4:4:4 / LT AVC-LongG XAVC XF-AVC DVCPRO HD HDV XDCAM... Read more
Boom 3D 1.3.11 - $19.99
Boom 3D is a revolutionary app with 3D Surround Sound and phenomenally rich and intense audio that is realistic and works on any headphones. Features 3D surround sound Built-in audio player... Read more
Final Cut Pro 10.5.2 - Professional vide...
Redesigned from the ground up, Final Cut Pro combines revolutionary video editing with a powerful media organization and incredible performance to let you create at the speed of thought.... Read more
Chromium 89.0.4389.72 - Fast and stable...
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all Internet users to experience the web. Version 89.0.4389.72: Complete list of changes can... Read more
iMovie 10.2.3 - Edit personal videos and...
With a streamlined design and intuitive editing features, iMovie lets you create Hollywood-style trailers and beautiful movies like never before. Browse your video library, share favorite moments,... Read more
OmniPlan 4.2.5 - Professional-grade proj...
With OmniPlan, you can create logical, manageable project plans with Gantt charts, schedules, summaries, milestones, and critical paths. Break down the tasks needed to make your project a success,... Read more
Compressor 4.5.2 - Adds power and flexib...
Compressor adds power and flexibility to Final Cut Pro X export. Customize output settings, work faster with distributed encoding, and tap into a comprehensive set of delivery features. Features:... Read more
Motion 5.5.1 - Create and customize Fina...
Motion is designed for video editors, Motion 5 lets you customize Final Cut Pro titles, transitions, and effects. Or create your own dazzling animations in 2D or 3D space, with real-time feedback as... Read more

Latest Forum Discussions

See All

Frogger in Toy Town's latest update...
Konami Digital Entertainment has announced today that their Apple Arcade title Frogger in Toy Town has been updated to introduce a new ranked Endurance Mode. This new game variant's arrival is also accompanied by a few other changes. [Read more] | Read more »
Mitoza is surreal adventure toy you can...
The folks behind the Rusty Lake games have just put a new title onto the App Store. Second Maze, Rusty Lake's collaborative publishing brand, has just brought this 10 year old adventure game from Gal Mamalya to mobile. The best part about all of... | Read more »
Pocket Gamer Awards 2021: You have five...
Three weeks ago our sister site, Pocket Gamer, entered the voting stage for the upcoming Pocket Gamer Awards 2021 and is now in the final stretch. You only have a few hours left to vote for the games you’ve enjoyed on mobile in the past year, as... | Read more »
Patty Stack is a casual arcade game, ava...
Patty Stack is a casual arcade title that's available now for iOS and Android. It's the debut game from developer Feeka Games tasks players with making an increasingly giant burger tower. Think of it as Tower Bloxx but more edible. [Read more] | Read more »
Distract Yourself With These Great Mobil...
There’s a lot going on right now, and I don’t really feel like trying to write some kind of pithy intro for it. All I’ll say is lots of people have been coming together and helping each other in small ways, and I’m choosing to focus on that as I... | Read more »
Genshin Impact Guide - Gacha Strategy: W...
This is part 2 of our Genshin Impact gacha strategy guides. See part 1 here. You can check out more guides for Genshin Impact here. | Read more »
Slashy Camp is a new endless runner insp...
Blue Wizard Digital has released Slashy Camp onto iOS and Android after it spent a short amount of time in early access. [Read more] | Read more »
Kinder World is a relaxing game about lo...
Lumi Interactive is releasing a game called Kinder World later this year on iOS and Android, which is all about looking after houseplants. [Read more] | Read more »
Steam Link Spotlight - Fights in Tight S...
Steam Link Spotlight is a feature where we look at PC games that play exceptionally well using the Steam Link app. Our last entry was on Hades. Read about how it plays using Steam Link over here. | Read more »
Lyxo, the light-based puzzler for mobile...
Vienna-based independent game studio Emoak has just released its unique light-based puzzler for iOS and Android. Founded in 2014 by Tobias Sturn, the company is also the creative force behind the infinite climbing game Paper Climb, as well as the... | Read more »

Price Scanner via MacPrices.net

Weekend Sale: $100 off Apple iPad Magic Keybo...
Amazon has Apple iPad Magic Keyboards on sale for $100 off MSRP for a limited time. Amazon’s prices are the lowest available for iPad Magic Keyboard from any Apple reseller this weekend: – Magic... Read more
Gazelle now offering a full line of refurbish...
Gazelle is now offering a full range of discounted, refurbished, unlocked Apple iPhone 12 models starting at $649. iPhones are offered in Fair, Good, and Excellent conditions, and multiple colors are... Read more
These are the latest discounted iPhones Apple...
Apple has a range of Certified Refurbished iPhones available right now starting at only $339. Apple includes a standard one-year warranty, new outer shell, and shipping is free. According to Apple, “... Read more
Save up to $64 on new M1 MacBook Airs at Expe...
Apple reseller Expercom has 2020 13″ M1 MacBook Airs on sale for $51-$64 off Apple’s MSRP with prices starting at $947.96. In addition to their MacBook Air sale prices, take $50 off AppleCare+ when... Read more
Discounts available on 16″ MacBook Pros with...
Upgrade a 16″ 6-Core or 8-Core MacBook Pro from 16GB of standard RAM to 32GB at Adorama, and save $100-$210 over Apple’s price for this custom option: – 16″ 6-Core MacBook Pro/32GB RAM: $2699, save $... Read more
10.9″ iPad Airs on sale for $50-$70 off Apple...
Amazon has new 2020 10.9″ Apple WiFi iPad Airs in stock and on sale today for up to $70 off MSRP with prices starting at $549. Note that Amazon’s sale price might be restricted to certain colors (see... Read more
Apple restocks 2020 27″ 5K iMacs for up to $3...
After an initial offering in January, Apple has restocked a full line of Certified Refurbished 2020 27″ 5K iMacs starting at $1529 and up to $350 off original MSRP. Apple’s one-year warranty is... Read more
Sale! 16″ 8-Core MacBook Pro for $2449, $350...
Apple reseller Adorama has the 16″ 2.3GHz 8-Core Space Gray MacBook Pro in stock and on sale today for $2449 including free shipping. Their price is $350 off Apple’s MSRP for this model, and it’s the... Read more
Roundup of 13″ Multi-Core Intel MacBook Pro s...
Apple resellers are offering significant sales & deals this week on 2020 13″ MacBook Pros with 10th generation Intel CPUs. Take up to $250 off Apple’s MSRP, get free fast shipping, and/or pay no... Read more
64GB iPhone 8 Plus available for $379 at Appl...
Apple has the 64GB iPhone 8 Plus in Space Gray & Gold colors available for $379 today, Certified Refurbished. Each phone is unlocked and comes with Apple’s standard 1-year warranty and free... Read more

Jobs Board

Geek Squad Advanced Repair *Apple* Professi...
**795178BR** **Job Title:** Geek Squad Advanced Repair Apple Professional **Job Category:** Store Associates **Store Number or Department:** 001406-Allen Park-Store Read more
Geek Squad *Apple* Consultation Professiona...
**796549BR** **Job Title:** Geek Squad Apple Consultation Professional **Job Category:** Store Associates **Store Number or Department:** 001800-Hot Springs-Store Read more
*Apple* Mobility Specialist - Best Buy (Unit...
**796014BR** **Job Title:** Apple Mobility Specialist **Job Category:** Store Associates **Store Number or Department:** 001776-Woodmore Towne Centre-Store **Job Read more
Systems Architect, *Apple* Production Engin...
…package beginning on your first day? If so, we hope you'll keep reading! The Apple Sales Engineering and account team is looking for a stellar presales engineer with Read more
Systems Engineer, Webscale, *Apple* Retail,...
…beginning on your first day? If so, we hope you'll keep reading! The Apple Sales Engineering team is looking for a pre-sales engineer with Enterprise engineering Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.