TweetFollow Us on Twitter

VIP
Volume Number:3
Issue Number:4
Column Tag:Visual Programming

C The Easy Way with VIP!

By Bill Luckie, Simi Valley, CA

Getting started

While thinking about how best to present information useful to new Mac programmers, I recalled some of my own frustrations in trying to learn Macintosh programming. Before V.I.P., there seemed to be at least two hurdles to achieving even a modest success in programming on the Macintosh. First was the requisite learning of the chosen language's rules and syntax, and then trying to fathom the complexities of dealing with the Mac toolbox specifics. What I wanted was a simple example program that featured all of the fundamental aspects of nearly every Mac program, i.e. Menus, Windows, Dialogs, and Events. The example I longed for had to be simple, logical, and easily modified for my own purposes. Well, to make a long story short, I never was able to jump both hurdles - until V.I.P.

Our introductory course in Visual Interactive Programming will attempt to lower the hurdles by providing a simple Macintosh program featuring all of the attributes mentioned above. Along the way we will experience the advantages of modularity, create menus and implement actions accordingly. Display and draw in a couple of types of windows. Learn about local and global objects, argument passing between routines, and hopefully have some fun too. VIP is truly an amazing new approach to Mac programming that is as fun and straight forward as MPW and MacApp are laborious and complex. And as we will see, creating C source code from VIP is really having your cake and eating it too!

The program presented here is a completely functional Macintosh program, although it is a little brain damaged, and really doesn't do much yet. It does provide a text edit window for displaying a file's contents and allows the file contents to be printed. Readers familar with our text edit shell program in the January issue will recall that those functions can generate a considerable amount of source code in "normal" languages. Moreover, with minor changes, this program can serve as a shell for most any application you wish to create. In a future article we will add the guts and feathers routines which perform the program's peculiar actions.

Routines have Relations

Before we begin, take a look at figure 1. This relations tree is created automatically by V.I.P. and graphically displays the relations of each routine making up our example program. A routine, as you may recall, is simply a logical grouping of V.I.P. procedures and logic forms which perform actions as specified by the programmer. Routines are called by other routines, or may even be called by themselves to control the execution sequence, or perform specific tasks. In other languages, a subroutine or procedure, but in VIP, there are no return statements to worry about.

Program flow

Main calls the DoSetup routine, which as its name suggests, does the program peculiar setup tasks. In this case the program's menus are created, and a window with user information is displayed briefly. The program's main event loop is entered and the routine DoSelect is called. When the while condition evaluates to true, the program exits.

VIP is in reality a high level ROM language that provides a mouse driven set of templates for filling in automatically, the necessary calls to the toolbox to create windows, menus, events and quickdraw functions. While Lightspeed C and Pascal give you a feeling of "instant" in compiling and running programs, VIP is another order of magnitude above that in the ease and speed of testing and trying various toolbox options. Variables are defined and assigned in boxes with the mouse so that changes such as the type of window to display can be made in a way that makes interactive BASIC seem like a chore. A quick click of the mouse, and the program puts up a new type of window! Experimentation with the toolbox is easy and educational in this environment.

The DoSelect routine includes the get next event procedure and directs program flow according to event type. VIP knows about events and pre-defines the events for most program functions so that event driven programming is greatly simplified. A type 1 event results in a call to the DoMenuSelect routine. The switch logic form branches to handle selection of the File, Edit, or Option menus. Each corresponding routine, DoFile, DoEdit, or DoOptions now determines the action to take as a result of a menu item selection. A type 4 event is processed when a click in a window close box is detected, and the routine DoCloseBox handles the details. Type 5 events are handled by the procedure DoDialogEvent.

Wait a minute...

The process of creating a computer program, regardless of the language used, normally doesn't start by writing specific code. Whether you subscribe to the 'top down', 'bottom up', or my personal favorite - 'omphaloskepsis' (try that one on your spell checker) method of computer programming, you will need to do a little designing.

Time spent in program design will save development time and simplify the coding process. However, the design and coding phases are not mutually exclusive activities, nor are they necessarily serial in occurrence. Before any of the code for this program was created, I had the concept of what I wanted the program to do. I knew that I wanted to demonstrate the use of menus, dialog, windows, and events. I also knew I wanted routines to store and retrieve data from disk, and to do some arithmetic using a couple of V.I.P.'s intrinsic functions. Well, as you can imagine, that brief concept hardly constituted a design, but I'm not one to let mere details stand in my way of having fun. So off I go simultaneously designing and coding. I'm not advocating this approach for others, it's just how my fragmented mind works, and V.I.P. is very accommodating to this approach.

Main revisited

A main routine is required in all executable V.I.P. programs. Program execution always begins in main, and a number of housekeeping tasks such as initializing global objects, and a bunch of other 'who cares' stuff is performed automatically by V.I.P. As a general guideline, the main routine in a well designed program should do a minimum amount of work. The first thing main does is call the routine, DoSetup. DoSetup defines the menus used by the program, and to add a little visual effect, a window as shown in figure 2 is displayed briefly. Of course, in a program of your own design, the actions to be performed by this routine would be different. V.I.P. also offers the ability to create menus, windows, dialogs, etc. as resources, which could be loaded by this routine if desired.

When the DoSetup routine has completed its tasks, program execution resumes in main. The while logic form sets up the main event loop of our program, which says in effect; While Quit = 0, call the routine named DoSelect, and whenever Quit 0, exit. So, how did Quit get the value of 0 to begin with, and why doesn't the expression shown in the program listing say Quit = 0? Good questions; which gives me the opportunity to talk about global and local objects. The symbol 'Quit' was declared to be a global object of type 'byte' by clicking on the 'b' icon in the upper group of icons to the left of V.I.P's Editor window. (Remember, VIP is programming by mouse; all the language commands are accessed from the on-screen icon lists!) Typing Quit in the dialog's text edit field, clicking the Global radio button, and clicking 'Insert', completed the declaration.

Global objects which are not specifically initialized to a particular value, are automatically allocated static memory with a value of 0 at the start of program execution. Ergo Quit = 0 until we change it. Global objects, as the name implies, have meaning to all of the routines in a program. Global objects are said to be declared outside of main, and as noted in the program listing, that's where they are. (They are assigned relative to A5 by VIP like other Mac languages, but the programmer doesn't need to worry about the details.) The second part of the question; why isn't the expression 'Quit = 0'? Well, it is. It's just written in a different fashion. The character '!' represents the logical 'not'. In V.I.P. falsity is 0, and anything else is true. So by saying, while ! Quit, we are saying in effect; while Quit = 0, or false, DoSelect. Take a look at the DoFile routine and you will see that the value of Quit is changed to 1 (true), and the program breaks out of the while loop and dutifully exits.

Local objects, on the other hand, are known only to the routine in which they are declared, and appear in the program listing just below the routine's name. Local objects belong to the automatic memory class, which isn't a particularly important piece of information. What is important, is the fact that the initial value of local objects is indeterminate, and cannot be predetermined at the beginning of a routine. Figure 3 is a table showing the characteristics of V.I.P. objects.

Since VIP objects include bytes, integers (long), reals, points, rectangles, and constants, one might wonder just how string variables are declared. This is not clearly brought out in the manual. A string variable is declared as a one dimensional byte array of length 255. The CopyString function is used to initialize the variable, rather than the assign statement. Clicking on the "cc" icon produces the list of string functions of which CopyString is one.

Routines can call other routines and they may communicate with each other by passing arguments. V.I.P. allows up to 64 arguments to be passed to the called routine. When the 'Routine Call' icon is clicked, a dialog asking how many arguments is displayed. Type in the appropriate number; 0 to 64, and click 'OK'. The Routine Call box is introduced in V.I.P.'s Editor window with its input window open. Figure 4 shows the Routine Call 'DoMenuSelect' as noted in the program listing in the DoSelect routine. In the printed listing, the arguments to be passed are contained within parentheses immediately following the name of the routine to be called. In the DoSelect routine, EventID, EventMessage, and EventType have been declared to be byte objects, and MouseLocation is a point object - all local to the DoSelect routine. One problem with such a visual programming environment is that it is hard to communicate the program intent. The print function does print the guts of the program, but re-producing a VIP program from such a listing is harder than just creating your own visual program from the program's intent! A VIP program is an example of dynamic documents that really want to be shared and passed on a network rather than be reduced to paper. Its a little like trying to describe a MacPaint picture from a written description!

By selecting Set arguments... from the Routines menu, a dialog as shown in Figure 5 is displayed allowing the programmer to specify the order and type of arguments being passed to the called routine. The order of the arguments is very important to assure that argument passing between the calling and called routine is done correctly. The arguments defined for the Routine Call 'DoMenuSelect' (figure 4), will be successively assigned to their counterparts in the DoMenuSelect routine, i.e. menu and item. There must be an exact match of the number of arguments, their order, type and dimensions. Various object types can be defined in this dialog by specifying a number from 1 to 5 representing object types Byte to Rectangle respectively. Arguments may be defined to be either 'input' or 'output' by clicking the appropriate radio button. An input argument can only be read in the called routine, while an output argument can also be modified. The choice between the two depends upon the use envisioned by the programmer.

Where were we?

Let's start with a little refresher in creating a V.I.P. program by following the printed listing. Open V.I.P. and select New from the File menu. The first item in the listing is the routine call DoSetup. Click on the routine call icon, and when the argument dialog appears, enter 0, as we don't need to pass any arguments to this routine. Click OK, and enter the name of the routine to be called, i.e. DoSetup. Continue by clicking just below the routine call box to position the insertion arrow, and click on the while logic form icon. Enter the expression as shown within the parentheses following while. Again position the insertion arrow by clicking just below the 'T' in the while loop, and enter the routine call for the DoSelect routine as above. Click outside of the while loop and select the procedure exit to complete the main routine.

Select Set Routine... from the Routines menu, type DoSetup in the text edit field, and click insert. Do the same for DoSelect. Double click the routine call box to go directly to the DoSetup routine. Click on the menu class icon, select new menu in the selection dialog and click the Select button. The new menu procedure is now immediately displayed in V.I.P.'s Editor window with its input window open ready for programmer entered arguments.

For title, enter "File" ( Don't forget the quote marks.), and for menu, enter menu[1]. Continue by clicking the down arrow to close the procedure's input window, and click just below the procedure to position the insertion arrow for the next procedure. Click on the menu class icon again, select append menu item from the list and click the select button. Enter the arguments for menu and menu item exactly as shown in the listing. Note semicolons are used to separate menu items, and the entire list is a character string enclosed in quotes.

Now to save a little time, we can copy the first two procedures by shift clicking to extend the selection range. Select Copy from the Edit menu. As before click just below the last procedure to position the insertion arrow, and then select Paste. Edit the argument fields to match the listing for both procedures, and repeat again for the next set of procedures.

By now I'm sure you have grasped the mechanics of V.I.P. programming, so from here on let's concentrate on the structure of our example program, and I'll depend on you to select the procedures, enter the arguments, and declare objects as shown in the listing. If you do make a mistake and paste something where you didn't intend it to be, there is an Undo command in the Edit menu. Other goofs of a syntactic nature will usually be caught by V.I.P.. It's a good idea to save your work from time to time, and always before you run a program.

DoSelect

The DoSelect routine is made up of the get next event procedure, and a switch logic form having three active branches. Arguments for get next event have been declared to be local to this routine. The selector for the switch structure is the symbol 'EventType', and case 1 will be selected if EventType =1, case 2 if EventType =4, and case 3 if EventType =5. When an event occurs the get next event procedure records the fact by putting the value of the objects, type, location, message, and ID into the event queue. When the switch structure detects the symbol ' EventType' is equal to 1, 4, or 5, the appropriate routine call is made. Figure 6 is a table showing V.I.P.'s event handling technique.

DoMenuSelect

The DoMenuSelect routine uses the ubiquitous switch structure to select which routine should be called to process the actions of the three menus in our example program. DoFile, DoEdit, and DoOptions correspond to the menu names. Whichever routine is called, it is passed the argument 'item', i.e., the menu item.

DoFile

In our example program the only actions to be performed from the File menu are Page Setup..., Print..., and Quit. Another switch structure (sound familiar?) switches based on the value of 'item' which was passed as an argument by the DoSelect routine.

Case 1 envokes the procedure set up page which requires no arguments. Case 2 is selected when Print... is chosen. An if logic form is used to check if there is an active window, and if not to display an Alert informing the user of that fact. Case 3 is selected when the fourth menu item is selected. The object Quit is assigned the value of 1, and the program quits. Remember that every item in a menu list is counted, even if it is disabled or is just a separator line.

DoEdit

The DoEdit routine is mostly for show. Edit menus are normally provided for use by desk accessories even if their functions aren't particularly useful in the host program. V.I.P.'s procedures, cut text, copy text, paste text, and clear text take care of these chores and require no arguments.

DoOptions

As before a switch structure directs program flow depending on the value of the object 'item'. Now for the clever part. To test the functionality of our example program without the necessity of completing the details of each called routine, we simply put an Alert in each branch. These Alert's with appropriate messages serve as stubs giving visual indication of proper program execution. Later these stubs are replaced with the specific code as desired by the programmer. For now, 'About' is the only active routine in DoOptions.

About

This routine creates a fixed size document window using the dimensions specified by the set rect procedures. The new window routine is used to create our window. The new version of VIP, 2.14, has fixed a number of shortcomings regarding windows. Window type 7 now allows a fully functional window frame with a grow box, zoom box, close box and working scroll bars. Most of the window mechanics are provided for automaticaly, so in our example program here, the text displayed can be scrolled without our having to invent a scrolling routine. The same is true for the zoom and grow functions. Programmers familar with the toolbox will recall that new window trap is a complex operation with many parameters. In VIP, the process is simplified considerably. We specify the graf port rectangle, the displayed window rectangle, title and type. The window pointer returned by the ROM trap is managed in the overhead of VIP for us. A simple byte variable allows us to keep track of which of our windows we are looking at.

A TEXT file is opened, and the text is displayed in the window by the load text procedure. The file is then closed . If desired, a printed copy of this window's text may be printed by selecting Print... from the File menu. When the user is finished reading the text, a click in the window close box is detected by the get next event procedure and the routine DoCloseBox is called. See figure 7.

DoCloseBox

Gee, I bet you can't guess what this routine does. Well, just in case; an if logic form checks to see if a window called Window is the one to close. If it is, the procedures kill window and assign are executed, else do nothing. So far in our example program there is but one window which can be closed by clicking its close box, so the if statement is really superfluous. The assign procedure is used to restore the global value of 0 to Window to ensure the Print... selection will work properly after the window has been closed.

DoDialogEvent

DoDialogEvent is called when the get next event procedure detects an event of type 5. This routine is currently empty, and its details will be added in our next session.

DoTryIt

This is not the name of a routine in our example program, it is rather my recommendation to you. In a future article we will explore the subject of Dialogs, records, saving and retrieving data from disk, and use a few of V.I.P.'s intrinsic functions. Add more menus, open additional windows, disable menu items when their selection is not appropriate, experiment, have fun. VIP is an addicting way to explore the Mac that does not require knowledge of a programming syntax. Why, I even taught my wife how to use it! Yet the real power of VIP may lie in its ability to produce old fashioned source code in a variety of languages. The VIP to LS C translator is now available, and a LS Pascal module is due out shortly.

Fig. 7 About Text File Display

VIP to C

To convert our VIP program to C source code, we simply execute the VIP translator utility. This program reads our VIP file and outputs a C source text file. The Lightspeed project window in figure 8 shows the include files necessary to create a working program. All these files are either provided for by Mainstay, if they are VIP libraries, or in the case of the Unix files, are provided for in Lightspeed C. A ready-made resource file is provided that we must combine with our program file to create a working C program. Both the VIP and C versions of this program are included on our source code disk. As long as the files shown are included in the project, I had no trouble compiling and making the C program into a stand-alone application. As you look at the C listing and compare it to the VIP listing, you'll see that even the comments in our VIP boxes have been inserted properly into the code. It would be nice if there were some way to re-generate VIP programs from either the VIP program listing or the C source listing. As we mentioned previously, there is no good way to communicate a VIP program on paper, a real problem for programming journals!

Fig. 8 LS C Project Files for VIP to C

VIP Improvements

There are two areas that jump out as needing attention in VIP. When programming by mouse, you tend to quickly define statements and variables on the fly. Once a variable is specified in a statement box, you must add the variable to the variable list as either a global or local variable. It would be natural to use the variable name in a new window procedure box for example, and then copy and paste the name into the objects window where the variables are defined. However, the objects window is a modal dialog box, and so the edit menu is locked out! This requires you to re-type the name of the variable from memory, a distinctly non-Mac'ish way to do things in a dynamic environment like VIP.

The second design bug in VIP is the way in which you can move easily from one level to a nested subroutine. Because programming VIP involves working with what we will call a "dynamic flowchart", the program has a kind of ResEdit quality to it that lets you move from one procedure to another by clicking on the call box of the routine. This moves you down one level in the calling sequence to the nested routine. However, there is no "pop-up" button to click to return you up one level to the previous routine you were working in. To get back, you have to go to the menu bar and re-select the routine by name to make it the current window display. Hence it's easy to move down a level into a subroutine, but a pain to come back up.

The new version of VIP, 2.14, has fix a number of bugs and shortcomings so that the product now is very functional. With the addition of various translator programs, VIP may become a kind of universal programming language for the Mac. "Mouse up" a program in VIP, then translate it to the language of your choice: C, Pascal, even Ada! Then take the listings and compare them. Could be a whole new way to learn programming language syntax!

{1}
VIP Program Listing (Text File)
byte
 Menu[3]
 Quit
 Window
 result

main

V.I.P. Demo program for MacTutor™
by Bill Luckie  © 1987

Visual Interactive Programming
V.I.P. by Dominique Lienart
 Published by Mainstay.
...................................................
DoSetup
while (! Quit)
 DoSelect
exit

About
.....................................................
byte
 AboutFile
rectangle
 PortRect
 WindowRect
set rect (50,40,312,472,WindowRect)
set rect (0,0,1000,432,PortRect)
new window (2,1,1,WindowRect,PortRect,"About GC_ Dist",Window)
open file ("AboutGCDist",1,"TEXT",AboutFile)
load text (AboutFile,Window)
close file (AboutFile)

DoCloseBox
........................................................
if (Window)
 kill window (Window)
 assign (0,Window)
else 
 
DoDialogEvent
...........................................................

DoEdit (item)
...........................................................
--> byte item

switch (item,3,4,5,6)
case 1
 cut text
case 2
 copy text
case 3
 paste text
case 4
 clear text
default 
 
DoFile (item)
.......................................................
--> byte item

switch (item,1,2,4)
case 1
 set up page
case 2
 if (Window)
 print text (Window)
 else 
 alert (1,"There is no window to print from.",result)
case 3
 assign (1,Quit)
default 

DoMenuSelect (menu,item)
................................................................
--> byte menu
--> byte item

switch (menu,Menu[1],Menu[2],Menu[3])
case 1
 DoFile (item)
case 2
 DoEdit (item)
case 3
 DoOptions (item)
default 
 
DoOptions (item)
...........................................................
--> byte item

switch (item,1,2,3,5)
case 1
 alert (1,"This is the Create_Records routine.",result)
case 2
 alert (1,"This is the View_Records routine.",result)
case 3
 alert (1,"This is the Compute Distance... routine.",result)
case 4
 About
default 
 
DoSelect
............................................................
byte
 EventID
 EventMessage
 EventType

point
 MouseLocation
get next event (EventType,MouseLocation,EventMessage,EventID)
switch (EventType,1,4,5)
case 1
 DoMenuSelect (EventMessage,EventID)
case 2
 DoCloseBox
case 3
 DoDialogEvent
default 
 
DoSetup
..........................................................
rectangle
 Portrect
 Windowrect

new menu ("File",Menu[1])
append menu item (Menu[1],"Page Setup...;Print...;(-;Quit/Q")
new menu ("Edit",Menu[2])
append menu item (Menu[2],"(Undo/Z;(-;Cut/X; Copy/C;Paste/V;Clear")
new menu ("Options",Menu[3])
append menu item (Menu[3],"Create new Records...; View or Edit Records...; 
Compute Distance...;(-; About GC_Dist")
set rect (60,60,120,450,Windowrect)
set rect (0,0,120,450,Portrect)
new window (4,1,1,Windowrect,Portrect,"",Window)
set text font (0)
move to (15,75)
draw string ("V.I.P. Demo program for MacTutor™",0)
move to (30,145)
draw string (" by Bill Luckie.",0)
move to (45,168)
draw string ("© 1987",0)
wait (200)
kill window (Window)
{2}
VIP Program "C" Listing
#include "VIPtoC.h"
/* Global symbols */
char
 Menu[3],
 Quit,
 Window,
 result;
/*
-------------- main --------------
V.I.P. Demo program for MacTutor™
by Bill Luckie  © 1987
Visual Interactive Programming
V.I.P. by Dominique Lienart, published by Mainstay.
*/
main ()
{
VIP_Init ();
vip_DoSetup ();
while (! Quit)
 {
 vip_DoSelect ();
 }
VIP_Exit ();
}
/*
-------------- About --------------
*/
vip_About ()
{
char
 AboutFile;
Rect
 PortRect,
 WindowRect;
VIP_set_rect ((long)(50),(long)(40),(long)(312),(long)(472),&WindowRect);
VIP_set_rect ((long)(0),(long)(0),(long)(1000),(long)(432),&PortRect);
VIP_new_window ((char)(2),(char)(1),(char)(1),WindowRect,PortRect,"About 
GC_ Dist",
 &Window);
VIP_open_file ("AboutGCDist",(char)(1),"TEXT",&AboutFile);
VIP_load_text ((char)(AboutFile),(char)(Window));
VIP_close_file ((char)(AboutFile));
}
/*
-------------- DoCloseBox --------------
*/
vip_DoCloseBox ()
{
if (Window)
 {
 VIP_kill_window ((char)(Window));
 Window = 0;
 }
}
/*
-------------- DoDialogEvent --------------
*/
vip_DoDialogEvent ()
{
}

/*
-------------- DoEdit --------------
*/
vip_DoEdit (item)
 char item;
{
switch ((long)(item))
 {
 case 3:
 {
 VIP_cut_text ();
 break;
 }
 case 4:
 {
 VIP_copy_text ();
 break;
 }
 case 5:
 {
 VIP_paste_text ();
 break;
 }
 case 6:
 {
 VIP_clear_text ();
 break;
 }
 }
}
/*
-------------- DoFile --------------
*/
vip_DoFile (item)
 char item;
{
switch ((long)(item))
 {
 case 1:
 {
 VIP_set_up_page ();
 break;
 }
 case 2:
 {
 if (Window)
 {
 VIP_print_text ((char)(Window));
 }
 else
 {
 VIP_alert ((char)(1),"There is no window to print from.",&result);
 }
 break;
 }
 case 4:
 {
 Quit = 1;
 break;
 }
 }
}
/*
-------------- DoMenuSelect --------------
*/
vip_DoMenuSelect (menu,item)
 char menu;
 char item;
{
if (menu == Menu[(1) - 1])
 {
 vip_DoFile ((char)(item));
 }
else if (menu == Menu[(2) - 1])
 {
 vip_DoEdit ((char)(item));
 }
else if (menu == Menu[(3) - 1])
 {
 vip_DoOptions ((char)(item));
 }
}

/*
-------------- DoOptions --------------
*/
vip_DoOptions (item)
 char item;
{
switch ((long)(item))
 {
 case 1:
 {
 VIP_alert ((char)(1),"This is the Create_Records routine.",&result);
 break;
 }
 case 2:
 {
 VIP_alert ((char)(1),"This is the View_Records routine.",&result);
 break;
 }
 case 3:
 {
 VIP_alert ((char)(1),"This is the Compute Distance... routine.",
 &result);
 break;
 }
 case 5:
 {
 vip_About ();
 break;
 }
 }
}

/*
-------------- DoSelect --------------
*/
vip_DoSelect ()
{
char
 EventID,
 EventMessage,
 EventType;
Point
 MouseLocation;
VIP_get_next_event (&EventType,&MouseLocation, &EventMessage,&EventID);
switch ((long)(EventType))
 {
 case 1:
 {
 vip_DoMenuSelect ((char)(EventMessage),(char)(EventID));
 break;
 }
 case 4:
 {
 vip_DoCloseBox ();
 break;
 }
 case 5:
 {
 vip_DoDialogEvent ();
 break;
 }
 }
}
/*
-------------- DoSetup --------------
*/
vip_DoSetup ()
{
Rect
 Portrect,
 Windowrect;

VIP_new_menu ("File",&Menu[(1) - 1]);
VIP_append_menu_item ((char)(Menu[(1) - 1]),"Page Setup...;Print...;(-;Quit/Q");
VIP_new_menu ("Edit",&Menu[(2) - 1]);
VIP_append_menu_item ((char)(Menu[(2) - 1]),"(Undo/Z;(-;Cut/X;Copy/C;Paste/V;Clear");
VIP_new_menu ("Options",&Menu[(3) - 1]);
VIP_append_menu_item ((char)(Menu[(3) - 1]),"Create new Records...;View 
or Edit Records...;Compute Distance...;(-;About GC_Dist");
VIP_set_rect ((long)(60),(long)(60),(long)(120),(long)(450),&Windowrect);
VIP_set_rect ((long)(0),(long)(0),(long)(120),(long)(450),&Portrect);
VIP_new_window ((char)(4),(char)(1),(char)(1),Windowrect,Portrect,"",
 &Window);
VIP_set_text_font ((char)(0));
VIP_move_to ((long)(15),(long)(75));
VIP_draw_string ("V.I.P. Demo program for MacTutor™",(char)(0));
VIP_move_to ((long)(30),(long)(145));
VIP_draw_string (" by Bill Luckie.",(char)(0));
VIP_move_to ((long)(45),(long)(168));
VIP_draw_string ("© 1987",(char)(0));
VIP_wait ((long)(200));
VIP_kill_window ((char)(Window));
}
vip_draw_port (wndwID)
 char wndwID;
{
}
 
AAPL
$102.47
Apple Inc.
+2.71
MSFT
$44.88
Microsoft Corpora
+0.80
GOOG
$526.54
Google Inc.
+5.70

MacTech Search:
Community Search:

Software Updates via MacUpdate

RapidWeaver 6.0 - Create template-based...
RapidWeaver is a next-generation Web design application to help you easily create professional-looking Web sites in minutes. No knowledge of complex code is required, RapidWeaver will take care of... Read more
NTFS 12.0.39 - Provides full read and wr...
Paragon NTFS breaks down the barriers between Windows and OS X. Paragon NTFS effectively solves the communication problems between the Mac system and NTFS, providing full read and write access to... Read more
RestoreMeNot 2.0.3 - Disable window rest...
RestoreMeNot provides a simple way to disable the window restoration for individual applications so that you can fine-tune this behavior to suit your needs. Please note that RestoreMeNot is designed... Read more
Macgo Blu-ray Player 2.10.9.1750 - Blu-r...
Macgo Mac Blu-ray Player can bring you the most unforgettable Blu-ray experience on your Mac. Overview Macgo Mac Blu-ray Player can satisfy just about every need you could possibly have in a Blu-ray... Read more
Apple iOS 8.1 - The latest version of Ap...
The latest version of iOS can be downloaded through iTunes. Apple iOS 8 comes with big updates to apps you use every day, like Messages and Photos. A whole new way to share content with your family.... Read more
TechTool Pro 7.0.5 - Hard drive and syst...
TechTool Pro is now 7, and this is the most advanced version of the acclaimed Macintosh troubleshooting utility created in its 20-year history. Micromat has redeveloped TechTool Pro 7 to be fully 64... Read more
PDFKey Pro 4.0.2 - Edit and print passwo...
PDFKey Pro can unlock PDF documents protected for printing and copying when you've forgotten your password. It can now also protect your PDF files with a password to prevent unauthorized access and/... Read more
Yasu 2.9.1 - System maintenance app; per...
Yasu was originally created with System Administrators who service large groups of workstations in mind, Yasu (Yet Another System Utility) was made to do a specific group of maintenance tasks... Read more
Hazel 3.3 - Create rules for organizing...
Hazel is your personal housekeeper, organizing and cleaning folders based on rules you define. Hazel can also manage your trash and uninstall your applications. Organize your files using a... Read more
Autopano Giga 3.7 - Stitch multiple imag...
Autopano Giga allows you to stitch 2, 20, or 2,000 images. Version 3.0 integrates impressive new features that will definitely make you adopt Autopano Pro or Autopano Giga: Choose between 9... Read more

Latest Forum Discussions

See All

Ghost Blade (Games)
Ghost Blade 1.1 Device: iOS Universal Category: Games Price: $4.99, Version: 1.1 (iTunes) Description: Get the most outstanding 3D Action Game from App Store NOW! For those who dare pursue dreams. Masterpiece of Yu Shi Game ---China... | Read more »
Fiete – A Day on a Farm Review
Fiete – A Day on a Farm Review By Amy Solomon on October 21st, 2014 Our Rating: :: A MEMORABLE EXPERIENCEUniversal App - Designed for iPhone and iPad Fiete – A day on a farm in an interactive app for young children full of... | Read more »
Tilt to Live: Gauntlet’s Revenge is Almo...
Tilt to Live: Gauntlet’s Revenge is Almost Here Posted by Jessica Fisher on October 21st, 2014 [ permalink ] One Man Left has announced the official release date of Tilt to Live: Gauntlet’s Re | Read more »
Sago Mini Monsters Celebrates Halloween...
Sago Mini Monsters Celebrates Halloween with Fun Costumes and Special Treats. Posted by Jessica Fisher on October 21st, 2014 [ permal | Read more »
Inferno 2 Review
Inferno 2 Review By Andrew Fisher on October 21st, 2014 Our Rating: :: TWIN STICK GOODNESSUniversal App - Designed for iPhone and iPad With tight controls and awesome, stark visuals, Inferno 2 is loads of fun.   | Read more »
Clips Review
Clips Review By Jennifer Allen on October 21st, 2014 Our Rating: :: CONVENIENT PASTINGUniversal App - Designed for iPhone and iPad Making copying and pasting more powerful than usual, Clips is a great way to move stuff around.   | Read more »
MonSense Review
MonSense Review By Jennifer Allen on October 21st, 2014 Our Rating: :: ORGANIZED FINANCESiPhone App - Designed for the iPhone, compatible with the iPad Organize your finances with the quick and easy to use, MonSense.   | Read more »
This Week at 148Apps: October 13-17, 201...
Expert App Reviewers   So little time and so very many apps. What’s a poor iPhone/iPad lover to do? Fortunately, 148Apps is here to give you the rundown on the latest and greatest releases. And we even have a tremendous back catalog of reviews; just... | Read more »
Angry Birds Transformers Review
Angry Birds Transformers Review By Jennifer Allen on October 20th, 2014 Our Rating: :: TRANSFORMED BIRDSUniversal App - Designed for iPhone and iPad Transformed in a way you wouldn’t expect, Angry Birds Transformers is a quite... | Read more »
GAMEVIL Announces the Upcoming Launch of...
GAMEVIL Announces the Upcoming Launch of Mark of the Dragon Posted by Jessica Fisher on October 20th, 2014 [ permalink ] Mark of the Dragon, by GAMEVIL, put | Read more »

Price Scanner via MacPrices.net

Select MacBook Airs $100 off MSRP, free shipp...
B&H Photo has 2014 a couple of MacBook Airs on sale for $100 off MSRP. Shipping is free, and B&H charges NY sales tax only. They also include free copies of Parallels Desktop and LoJack for... Read more
13-inch 2.5GHz MacBook Pro on sale for $100 o...
B&H Photo has the 13″ 2.5GHz MacBook Pro on sale for $999.99 including free shipping plus NY sales tax only. Their price is $100 off MSRP. Read more
Strong iPhone, Mac And App Store Sales Drive...
Apple on Monday announced financial results for its fiscal 2014 fourth quarter ended September 27, 2014. The Company posted quarterly revenue of $42.1 billion and quarterly net profit of $8.5 billion... Read more
Apple Posts How-To For OS X Recovery
OS X 10.7 Lion and later include OS X Recovery. This feature includes all of the tools you need to reinstall OS X, repair your disk, and even restore from a Time Machine backup. OS X Recovery... Read more
Mac OS X Versions (Builds) Supported By Vario...
Apple Support has posted a handy resource explaining which Mac OS X versions (builds) originally shipped with or are available for your computer via retail discs, downloads, or Software Update. Apple... Read more
Deals on 2011 13-inch MacBook Airs, from $649
Daily Steals has the Mid-2011 13″ 1.7GHz i5 MacBook Air (4GB/128GB) available for $699 with a 90 day warranty. The Mid-2011 13″ 1.7GHz i5 MacBook Air (4GB/128GB SSD) is available for $649 at Other... Read more
2013 15-inch 2.0GHz Retina MacBook Pro availa...
B&H Photo has leftover previous-generation 15″ 2.0GHz Retina MacBook Pros now available for $1599 including free shipping plus NY sales tax only. Their price is $400 off original MSRP. B&H... Read more
Updated iPad Prices
We’ve updated our iPad Air Price Tracker and our iPad mini Price Tracker with the latest information on prices and availability from Apple and other resellers, including the new iPad Air 2 and the... Read more
Apple Pay Available to Millions of Visa Cardh...
Visa Inc. brings secure, convenient payments to iPad Air 2 and iPad mini 3as well as iPhone 6 and 6 Plus. Starting October 20th, eligible Visa cardholders in the U.S. will be able to use Apple Pay,... Read more
Textkraft Pocket – the missing TextEdit for i...
infovole GmbH has announced the release and immediate availability of Textkraft Pocket 1.0, a professional text editor and note taking app for Apple’s iPhone. In March 2014 rumors were all about... Read more

Jobs Board

Senior Event Manager, *Apple* Retail Market...
…This senior level position is responsible for leading and imagining the Apple Retail Team's global event strategy. Delivering an overarching brand story; in-store, Read more
*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
Project Manager / Business Analyst, WW *Appl...
…a senior project manager / business analyst to work within our Worldwide Apple Fulfillment Operations and the Business Process Re-engineering team. This role will work Read more
*Apple* Retail - Multiple Positions (US) - A...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
Position Opening at *Apple* - Apple (United...
…customers purchase our products, you're the one who helps them get more out of their new Apple technology. Your day in the Apple Store is filled with a range of Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.