TweetFollow Us on Twitter

Hilbert Graphs
Volume Number:3
Issue Number:9
Column Tag:Fortran's World

Printing Hilbert Graphs

By Mark McBride, Contributing Editor, Oxford, OH

After an extended absence from writing for MacTutor, I have found time to develop new articles using Fortran on the Mac. The absence arose from developing of an educational application in LightSpeed Pascal for use in my 400 level college course. If only Fortran could have that type of development environment, I might never have switched to Pascal for start from scratch Mac applications. A final release version of that educational project should be finished by the summer (i.e., real soon now!). In the meantime, Microsoft released version 2.2 in the Fall of 1986 and other individuals picked up some of the slack (thanks for the article on controls in the April 1987 issue). This month’s article provides errata for Version 2.2, an overview of an “Extras” disk available from Absoft, and a small application which illustrates using the Print Manager, pictures, and procptr’s from within Fortran.

Extras Disk

Available from Absoft (the company which developed Microsoft Fortran for the Mac) is a disk call “Extras.” This disk contains additional example programs and subroutines that were not included in the Version 2.2 release. In particular the file contains:

gpsl: An alternative spool.sub which is compatible with the Laserwriter.

Macxrf: A Fortran source file cross referencer.

ctlprc: A method for using toolbox filter procedures, including a sample program using scroll bars.

splown: An additional, more flexible, interface to spool.sub. Three examples are provided.

prdrag: An example program for use of the prport.sub routine which allows calls to the Print Manager.

gpprnt: An example program of how to send a grafport to the printer.

scrdump: An example program of how to dump the current screen to the printer.

date: Assembly language routines for easy manipulation of the date and time records available with the Mac.

errata: Errata for the include files and toolbx.par files.

If you are interested in this disk contact Absoft Tech Support at (904) 423-7587. [Most of these files have been placed on the source code disk for this issue. I find it interesting that Microsoft never bothered to tell anyone about these errors, or correct them! -Ed] Several of the files are of interest for this month’s article. First, Listing 1 provides the errata for the include files. The last line of several of the include files mysteriously disappeared in the 2.2 release. Second, Listing 2 provides errors in the trap descriptors. These must be changed in both the toolbx.par file and the appropriate include files. One of these changes is for ‘HUnlock’ which is used in this month’s program. Listing 3 gives my modified version of the prdefs.inc file that provides definitions for the print record structures, used with the prprt.sub routine. Listing 4 gives the assembly code for the routine ctlprc.sub and the associated link file. This routine provides the “glue” to return a pointer to a Fortran procedure, which allows the use of filterprocs and control tracking procs. Discussion of the use of this routine is given below in the Hilbert graph program. In listing 5, is a little assembly routine to reset the randseed, since the Editor couldn’t find a copy of a5Glob.inc that is supposed to provide access to the quickdraw globals. Finally, in listings 6,7 and 8 is the actual Hilbert program for this month!

Fig. 1 Our Fortran Program prints Hilbert Graphs on a Laser

Hilbert Graph Program

This month’s program illustrates several Mac user interface features in a Fortran program: use of the Print Manager via the subroutine prport.sub, use of filter procedures via the subroutine ctlprc.sub, use of dialogs with the default button, use of pictures, and the addition of color to your printed Imagewriter II output.

The printgraph program has four salient features:

1. initialization of the program structures including a random order hilbert curve in pict format and use of common variables for the toolbox structures.

2. a short event loop to detect menu selections and a subroutine to process the menu selection.

3. a print subroutine which prints the hilbert picture via a graphport which is also Laserwriter compatible.

4. use of a background procedure during printing which allows the user to cancel the print in progress

The first two processes are straight forward and/or have been covered extensively in other MacTutor articles. The Hilbert curve is drawn using an adaptation to Fortran of an algorithm presented by Michael Anderson (Byte, June 1986:137-148). The routine draws the curve once as a picture (OPENPICTURE, CLOSEPICTURE). This allows the program to quickly redraw the graph to any grafport (window or printer) by a call to DRAWPICTURE. Before the picture is drawn, the order, the color, and the linesize of the Hilbert curve are set randomly.

The structure of the printgraph program keeps most of the toolbox related variables accessible to all routines through a common block. The use of the common block substantially reduced the resulting source code, given the source code intensity of Fortran when using ‘implicit none.’ An additional advantage of the common block approach (at least for me) is the ability to keep variable declarations grouped and clear for the toolbox related variables. A disadvantage of the approach is that include files cannot contain include files, thus the toolbox .inc files must be listed for every subroutine. This has a tendency to increase the number of lines being compiled (and compile time). The source for the common block declarations is kept in a separate file which is then “included” in the main program and every subroutine which needs access to the global toolbox related variables.

Printing

MS Fortran supports printing by two basic methods. The first is through standard Fortran output device methods (unit=6) and the routine spool.sub (or the laser compatible version available on the ‘Extras’ disk). The second is implementation of the Mac’s Print Manager routines. Version 2.2 uses a ‘glue’ routine, prport.sub, (similar to toolbx.sub for toolbox calls) to provide access to the Print Manager. The second method enables the Fortran program to have the typical Macintosh printing options. The Hilbert program uses the second method. Extensive details for using the Print Manager have been provided in other MacTutor articles (March 1987 MacTutor has one recent thorough overview of the basics). [The prport source and object code is included on the source code disk. Ed]

Use of the Print Manager involves two primary actions by the programmer. First, the program must maintain 120 byte printing record (TPrint record in Pascal, accessed via a THPrint handle or TPPrint pointer). The TPrint record contains most of the control information necessary for printing. Actually, the TPrint record contains several sub-records of information dealing with the printer, style, band, and job information as well as a variety of other variables (Print Manager version, page rectangle, etc.). Listing 6 provides an extended version of the file prdefs.inc, which provides the offsets into the print record. For a complete list of the offsets, see Inside Mac or the March 1987 MacTutor article on printing.

The various elements of the print record may be accessed via the MS Fortran long, word, or byte functions. For example, to obtain a pointer to the page rectangle from the print record you would:

rPageptr = long(prrechdl)+prInfo+rPage

where rPageptr is the returned pointer and prInfo+rPage provide the offset to the print record pointer. To set the pIdleProc pointer you would:

long(long(prrechdl)+prJob+pIdleProc = canproc

where canproc is the address of the print idle procedure (more below on this ability). Two key items to remember when accessing the print record are: first, temporarily lock the print record with HLOCK so that it does not move around on you because of a toolbox call and second, you have a handle to the print record. Thus, long(prrechdl) is a pointer to the start of the print record and long(long(prrechdl) + offsets) will return the 4 bytes at the offset into the print record. The functions word(long(...)) and byte(long(...)) return 2 bytes and 1 byte respectively.

To use the Print Manager, you first need to set up a print record using NEWHANDLE with a size of iPrintSize. Then set the values of the print record to the default with a call to PRINTDEFAULT. In your menu subroutine, handle a ‘Page Setup’ selection with a call to PRSTLDIALOG using the print record handle to set the style fields.

Once the print command has been selected, the program needs to do preliminary setup work (dialogs, margins, etc.). The actual printing process begins with a call PRJOBDIALOG. If the user accepted the job dialog, the program then needs to call PROPENDOC. Next, print a page of material by calling PROPENPAGE, drawing to the printer port (with QuickDraw commands, e.g., TextBox, DrawPicture, DrawString), and ending a page with PRCLOSEPAGE. The page cycle continues until all pages have been printed. When the user selects draft (or is using a Laserwriter) then the material is imaged and printed as the page is processed. If the user selected a spooled print operation, then the spool file is sent to the printer via a call to PRPICFILE. Whenever an error occurs, the print routine needs to exit ‘gracefully.’ If PROPENPAGE was called, call PRCLOSEPAGE after the error occurred and if PROPENDOC was called, call PRCLOSEDOC after the error occurred. See Apple Tech Note # 72 for further details on error handling and Laserwriter compatibility issues.

The Print Manager provides a useful feature in allowing ‘background’ tasks to occur during idle time. The most common use of the background feature is a dialog which provides information to the user about the progress of the print and allows the user to pause or cancel the print request. To use a background procedure, the pIdleProc field of the prJob sub-record of the print record is set to the address of the background procedure. The use of a procptr gives the program the flexibility to override the default mechanism, e.g., prssing command period. Until Absoft provided the assembly routine ctlprc.sub, programmers in Fortran were not able to implement this feature.

The subroutine ctlprc.sub generates a pointer to a Fortran procedure, which can then be passed as an argument to a toolbox call. The calling procedure for ctlprc.sub is:

aptr=CTLPRC(<filte proc name,<argument byte count>)

where CTLPRC and aptr are both declared integer*4. The filter proc name must also be declared integer*4 and external. The byte count is the number of bytes that will be pushed onto the stack by the toolbox, which is specific to the filter function being used. Ctlprc.sub locks itself in the Fortran heap and should be the first executable statement in the Fortran main program. If you are not going to use the procedure pointer till later, you can call ctlprc.sub with dummy arguments (which is what the printgraph program does).

The background procedure used in the printgraph program looks at the event queue with GETNEXTEVENT. If there was a keydown event corresponding to the return key or a click in the cancel button of the dialog, then a print abort error is set with PRSETERROR. After setting the error condition, control is returned to the Print Manager routine. The Print Manager routine detects the error and drops out of the printing process.

The printgraph program may be easily modified to allow printing of text. The user will need to print the text for each particular page using TEXTBOX, DRAWSTRING, etc. The key issues the program must keep track of are line and page counts in order to control the by-page imaging process.

Editor’s Notes

[As usual, I’ve stumbled over all the things Microsoft forgot to put in version 2.2. In particular, they left out the include file for getting at the quickdraw globals. Since this program re-seeds the random number generator by changing the quickdraw global randseed, I was unable to compile the program without the a5Glob.inc file, which I suppose many of you may have. I tried to create this file from the MDS assembler equates for the qd globals, but was unable to come up with a Fortran equivalent that would run correctly. The globals are tricky because they are a negative offset from A5. Finally, as deadline approached, I simply bashed an assembly routine called reset that calls tickcount and resets the randseed global. That listing and the link file is included here. The only file you need that is not included is the prport.sub listing, which was just too long. You can get that on the source code disk, or by contacting Absoft about their “Extras” disk, another item I had not heard of. Don’t you just love how these companies go out of their way to keep you informed of their upgrades, bugs and omissions? A guy could starve on the information Microsoft sends out. ]

{1}
Listing 1
Errata for Include Files
Provided by Absoft Tech Support

Microsoft FORTRAN Version 2.2 is distributed with several INCLUDE files
to aid in the interface to the Macintosh.  Five of these files are
incomplete.  They all are missing the last line.  The following lists 
the
file affected and the missing line.  Add these lines to the end of their
respective file.

FONT.INC:
   parameter (SETFONTLOCK=Z’90318000')
 
MENU.INC:
  +             SETMENUFLASH=Z’94A11000')

SCRAP.INC:
  parameter (ZEROSCRAP=Z’9FC80000',PUTSCRAP=Z’9FE92400')

SEGMENT.INC:
  +           GETAPPPARMS=Z’9F536C00',EXITTOSHELL=Z’9F400000')
     
TEXTEDIT.INC:
  parameter (TESCROLL=Z’9DD09400',TECALTEXT=Z’9D010000')
{2}
Listing 2
Errata for Toolbox.par
Provided by Absoft Tech Support

***********************************************************
* FUNCTION HomeResFile (TheResource: Handle) : Integer;
 INTEGER HOMERESFILE
 PARAMETER (HOMERESFILE=Z’9A450000')

* FUNCTION EventAvail (EventMask: Integer; VAR TheEvent: EventRecord):
*       Boolean;
 INTEGER EVENTAVAIL
 PARAMETER (EVENTAVAIL=Z’971CE000')

* FUNCTION SizeResource (TheResource: Handle): Longint;
 INTEGER SIZERESOURCE
 PARAMETER (SIZERESOURCE=Z’9A590000')

* PROCEDURE HUnlock (H: Handle);
 INTEGER HUNLOCK
 PARAMETER (HUNLOCK=Z’02A80088')

* PROCEDURE SetItemStyle (Menu: MenuHandle; Item: Integer;
*  ChStyle: Style);
 INTEGER SETITEMSTYLE
 PARAMETER (SETITEMSTYLE=Z’94211200')

* PROCEDURE SpaceExtra (extra: Integer);
 INTEGER SPACEEXTRA
 PARAMETER (SPACEEXTRA=Z’88E10000')

* PROCEDURE SetResInfo (TheResource: Handle; TheID: Integer;
*TheType: ResType; Name: Str255);
 INTEGER SETRESINFO
 PARAMETER (SETRESINFO=Z’9A911400')
{3}
* Listing 3
* Modified prdefs.inc
*

* [This file contains data definitions for use with the FORTRAN print 
manager interface (prport.sub).  This is not a complete set of print 
manager definitions; just enough to set up a basic print loop, using 
the print manager style and job dialogs to fill out the records.  See 
also prport.inc, prdrag.for. 20 Jan 86 Sent to Compuserve. EWG]

*
* 9 Apr 87  Modified by Mark E. McBride to add 
* additional print record offsets
*
* Offsets into 120 byte printing record
*
 integer iPrVersion! Print software ver
 parameter (iPrVersion=0)
 integer prInfo  ! PrInfo data 
 parameter (prInfo=2)
 integer rPaper  ! paper rect offset
 parameter (rPaper=16)
 integer prStl   ! print request’s style.
 parameter (prStl=24)
 integer prInfoPT! Time Imaging metrics
 parameter (prInfoPT=32)
 integer prXInfo ! Print info record.
 parameter (prXInfo=46)
 integer prJob   ! The Print Job request
 parameter (prJob=62)
 integer iPrintSize! rec size.[120 bytes]
 parameter (iPrintSize=120)
*
* Offsets into prInfo subrecord
*
 integer iDev    ! driver info
 parameter (iDev=0)
 integer iVRes   ! printer vert res
 parameter (iVRes=2)
 integer iHRes   ! printer hor resolution
 parameter (iHRes=4)
 integer rPage   ! page rectangle
 parameter (rPage=6)
*
* Offsets into prJob subrecord
*
 integer iFstPage! First page to print
 parameter (iFstPage=0)
 integer iLstPage! Last page to print
 parameter (iLstPage=2)
 integer iCopies ! copies to print
 parameter (iCopies=4)
 integer bJDocLoop ! Printing method
 parameter (bJDocLoop=6)
 integer bDraftLoop! Draft print flag.
 parameter(bDraftLoop=0)
 integer bSpoolLoop! Spooled print flag.
 parameter (bSpoolLoop=1)
 integer iFromUsr! True from application
 parameter (iFromUsr=7)
 integer pIdleProc ! background procedure
 parameter (pIdleProc=8)
 integer iPrStatSize ! PrStatus rec size [26 bytes]
 parameter (iPrStatSize=26)
{4}
; Listing 4
; ctlprc.sub source code
; Provided by Absoft Tech Support
;
; [Title: Toolbox Control/Filter glue procedure. Produced by: Absoft 
Soft, Inc.                        Date:  8/19/86
Purpose: To interface MacFortran with the Macintosh’s Toolbox. Notes: 
This procedure takes a FORTRAN procedure as an argument and returns a 
pointer to a procedure that can be called by the Macintosh toolbox.  
This is used to allow control tracking and filter procedures to be written 
in FORTRAN. Warnings/ Limitations: This procedure locks itself into the 
FORTRAN heap when it is called for the first time.  Since it returns 
pointers to locations within itself, it must never move.  It should therefore 
be called as the first executable statement in the main program.  If 
it is not desireable to set up the procedure pointers at the begining 
of the main program, ctlprc can also be called with a zero for the procedure 
argument.]
;
;
;DUMMY = CTLPRC(0, 0)
;
;[This will lock the subroutine in memory without setting up a procedure. 
Calling sequence: <procedure pointer> = CTLPRC(<filter proc>, <argument 
byte count> where <procedure pointer> is a FORTRAN INTEGER variable. 
 This will be assigned a pointer to a procedure.  This variable is then 
used as the filter procedure parameter in calls to the toolbox. <filter 
proc> is the name of the FORTRAN procedure to be called.from the toolbox. 
 This should be a procedure with a single integer parameter, which on 
entry will contain a pointer to the arguments from the toolbox as they 
appear on the stack. This must be declared as EXTERNAL in the program 
unit where CTLPRC is used; this will usually be the main program. <argument 
byte count> is the total number of bytes of arguments that the toolbox 
will push on the stack for the type of filter procedure that this FORTRAN 
procedure will be used for. For example, if the procudure is to be used 
to track a scroll bar, the toolbox will pass 2 parameters on the stack; 
the control handle (4 bytes) and the part code (2 bytes), for a total 
of 6 bytes.  The track procdure should be initialized with
;
 INTEGER TRACK
 .
 .
 .
 TRACK = CTLPRC(FTRACK, 6)
;
where FTRACK is the FORTRAN procedure name.  The integer variable TRACK 
will contain the address of a toolbox callable procedure.  A maximum 
of 16 procedures can be set up by ctlprc.  When this limit is reached, 
ctlprc will return a zero instead of a procedure pointer.]
;


        INCLUDE TOOLEQU.D

CTLPRC: 
 LEA    4(A7),A4 ; Load original Stack Ptr
 LEA    CTLPRC(PC),A5 ; Get exec addr
   CMPA.L  A0,A5   ; loaded in heap?
   BMI.S   L1      ; If linked avoid the set.
   MOVE.W  #1,-8(A1)    ; Mark routine PERMENANT.
L1:
 MOVE.L A0,APPLSCRATCH+4  ; Save impure pointer.
 LEA    NXTPRC,A2; Get addr next routine ptr.
 MOVE.L (A2),D0  ; Get offset to next routine.
 LEA    PRCTBL,A1; Get pointer to proc table.
 ADD.L  D0,A1    ; Point to next proc
 CLR.L  D0; Flag no room.
 LEA    ENDPRC,A3; Get address of table end
 CMPA.L A3,A2    ; Any room left?
 BGE.S  NOROOM   ; no
 MOVE.L A1,D0    ; Return proc pointer.
 MOVE.L (A4)+,A5 ; Get a pointer to count.
 MOVE.L (A5),D1  ; Get argument byte count.
 ADDQ.W #2,A1    ; Bypass BSR.S instruction.
 MOVE.W D1,(A1)+ ; Store argument byte count.
 MOVE.L (A4)+,A5 ; Get pointer to proc. ptr.
 MOVE.L (A5)+,(A1)+; Store procedure pointer.
 BNE.S  OKPROC   ; Not nil - update offset.
 MOVEQ  #0,D0    ; Nil proc-flag not installed.
 BRA.S  NOROOM   ; Do not update offset.
OKPROC: ADDI.L #8,(A2)  ; Offset to next proc
NOROOM: RTS


NXTPRC: DC.L0

PRCTBL: BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0

 BSR.S  GLUE
 DC.W 0
 DC.L 0
ENDPRC:


GLUE: MOVE.LA7,A1; Save pointer to proc info.
 MOVEM.LD2-D7/A2-A5,-(A7) ; Save the world.
 MOVE.L APPLSCRATCH+4,A0  ; Restore impure pointer.
 MOVE.L (A0),A4  ; Restore runtime lib pointer.
 LINK A6,#-1024  ; Get an arithmetic stack.
 LEA    -4(A6),A5; Put math stack in A5.
 MOVE.L (A1),A2  ; Get pointer to proc. info.
 MOVE.W (A2)+,-(A7); Save the argument byte count.
 MOVE.L (A2),A2  ; Get the procedure address.
 PEA    8(A1)    ; Push a pntr to arguments.
 MOVE.L A7,-(A7) ; Push a pntr to arg. pointer.
 JSR    (A2); Call the FORTRAN procedure.
 ADDQ.W #8,A7    ; Push argument to FORTRAN proc.
 MOVE.W (A7)+,D1 ; Get the argument byte count.
 UNLK A6; Return aritmetic stack.
 MOVEM.L(A7)+,D2-D7/A2-A5 ; Restore the world.
 ADDQ.W #4,A7  ; Bypass pointer to procedure info.
 MOVE.L (A7)+,A1 ; Save return address.
 ADD.W  D1,A7    ; Pop arguments.
 TST.W  D0; Set the condition codes.
 JMP    (A1); Return to the toolbox.

 END

Link File for ctlprc file

/DATA
/TYPE ‘    ‘ ‘    ‘
CTLPRC.REL
/OUTPUT ctlprc.sub
$
{5}
; Listing 5 Reset Subroutine
; resets the randseed qd global
;
; reset random seed
;
 include quickequ.d
 include traps.d
 include sysequx.d
 
 xdef   start
 
start:  
 clr.l  -(A7)  ;clear result
 _TickCount ;get tickcount
 clr.l  D2;clear D2
 move.l (A7)+,D2 ;pop off result
 movea.l(currentA5),A4  ;get A5
 movea.lGrafGlobals(A4), A3 ;get qd globals
 move.l D2, randSeed(A3)  ;update seed
 rts

Link File for Reset

/DATA
/TYPE ‘    ‘ ‘    ‘
reset.REL
/OUTPUT reset.sub
$
{6}
* Listing 6
* file:  PrintGraph.for
*
* PrintGraph Fortran Program
*
* Copyright (c) 1987 Mark E. McBride
*                    211 N. University Ave.
*                    Oxford, OH  45056
*
*
* Main Program
*
 program PrintGraph
 
 implicit none   ! helps keep us out of trouble

*
* Reset the pathname to reflect your disk setup
*
include XP40-6:MS Fortran:Include Files:desk.inc
include XP40-6:MS Fortran:Include Files:dialog.inc
include XP40-6:MS Fortran:Include Files:event.inc
include XP40-6:MS Fortran:Include Files:menu.inc
include XP40-6:MS Fortran:Include Files:memory.inc
include XP40-6:MS Fortran:Include Files:misc.inc
include XP40-6:MS Fortran:Include Files:quickdraw.inc
include XP40-6:MS Fortran:Include Files:textedit.inc
include XP40-6:MS Fortran:Include Files:utilities.inc
include XP40-6:MS Fortran:Include Files:window.inc
include XP40-6:MS Fortran:Include Files:prport.inc
include XP40-6:MS Fortran:Include Files:prdefs.inc
 
*include XP40-6:MS Fortran:Include Files:a5Glob.inc
*
* Local Variables
*
 integer*4 mouseloc! mouse loc from FINDWINDOW
 integer*4 eventmask ! events of interest
 integer*4 window! to get default window closed
 integer*4 rnum,rnum1! for use in random numbers
*
* Include the common variables
*
 include XP40-6:MS Fortran:printgraph.com
*
* lock in control proc handler in memory
*
 window=ctlprc(0,0)
*
*  Flush the event manager before calling
*
 eventmask = -1
*
*  Close MacFortran I/O window 
*
 window=toolbx(FRONTWINDOW)
 call toolbx(CLOSEWINDOW,window)
*
*  Call Text Edit and Dialog initilization.
*
 call toolbx(TEINIT)
 call toolbx(INITDIALOGS, 0)
*
*  Setup a print record for use later 
*
 prrechdl=toolbx(NEWHANDLE,iPrintSize)
 call prport(PROPEN)
 call prport(PRINTDEFAULT,prrechdl)
 call prport(PRCLOSE)
*
*  Setup colors array
*
 colors(1)=33
 colors(2)=30
 colors(3)=205
 colors(4)=341
 colors(5)=409
 colors(6)=273
 colors(7)=137
 colors(8)=69
*
* Build the menu from the resource file 
*
 menuhandle=toolbx(GETMENU,Apple)
 call toolbx(INSERTMENU,menuhandle,0)
 call toolbx(ADDRESMENU,menuhandle,’DRVR’)
 menuhandle=toolbx(GETMENU,File)
 call toolbx(INSERTMENU,menuhandle,0)
 menuhandle=toolbx(GETMENU,Edit)
 call toolbx(INSERTMENU,menuhandle,0)
 call toolbx(DRAWMENUBAR)
*
* setup rectangles 
*
 call toolbx(SETRECT,rect,0,0,342,512)
*
* setup watch cursor for later use
*
 curshandle=toolbx(GETCURSOR,4)
 call toolbx(HLOCK,curshandle)
 cursptr=long(curshandle)
 call toolbx(BLOCKMOVE,cursptr,toolbx(PTR, watch(1)),68)
 call toolbx(HUNLOCK,curshandle)
*
* seed the random number generator
*
*long(toolbx(GETGLOBAL)+RANDSEED)=toolbx(TICKCOUNT)
 call reset
*
* Setup values for Hilbert curve
*
 rnum=2 ! randomly set color
 do while (rnum=2) ! don’t get white
   rnum1=toolbx(RANDOM)
   rnum=int((abs(rnum1)/32768.0)*8+1)
 repeat
 colorpick=colors(rnum)
 rnum=toolbx(RANDOM) ! randomly set line size
 linepick=int((abs(rnum)/32768.0)*4+1)
 rnum=2
 do while (rnum<3)
   rnum1=toolbx(RANDOM) ! randomly set Hilbert order
   rnum=int((abs(rnum1)/32768.0)*6+1)
 repeat
 n=rnum

 call Drawing
*
* main event processing loop
*
 do
*
* handle system jobs
*
 call toolbx(SYSTEMTASK)
*
* handle events
*
 if (toolbx(GETNEXTEVENT,eventmask,eventrecord)) then
   select case (what)
     case (1)  ! mouse down
       mouseloc = toolbx(FINDWINDOW,where,window)
       if (mouseloc=1) then ! in menu bar
 call menus
       else if (mouseloc=2) then  ! systemwindow
         call toolbx(SYSTEMCLICK,eventrecord,window)
       end if
     case default! ignore other events
   end select
 end if
 repeat ! repeat for another event
*
* end of the main program
*
 end

*
* menus: mouse down event detected in menu area
*
 subroutine menus
 
 implicit none
*
* Reset the pathname to reflect your disk setup
*
include XP40-6:MS Fortran:Include Files:desk.inc
include XP40-6:MS Fortran:Include Files:dialog.inc
include XP40-6:MS Fortran:Include Files:event.inc
include XP40-6:MS Fortran:Include Files:menu.inc
include XP40-6:MS Fortran:Include Files:memory.inc
include XP40-6:MS Fortran:Include Files:quickdraw.inc
include XP40-6:MS Fortran:Include Files:misc.inc
include XP40-6:MS Fortran:Include Files:textedit.inc
include XP40-6:MS Fortran:Include Files:utilities.inc
include XP40-6:MS Fortran:Include Files:window.inc
include XP40-6:MS Fortran:Include Files:prport.inc
include XP40-6:MS Fortran:Include Files:prdefs.inc

include XP40-6:MS Fortran:Include Files:OSUtilities.inc
include XP40-6:MS Fortran:Include Files:scrap.inc
 
*
* local variables for menu subroutine
*
 character*80 name,pname
 integer*4 refnum,item4,i,j,size,count
 integer*2 OSErr
 logical ok
*
* variable for conversion to pascal type strings
*
 character*256 str255
*
*  variables for making menu selections
*
 integer*2 menuselection(2) ! menu select info
 integer*4 menudata! for use left of equals sign
 equivalence (menuselection,menudata)
*
* Include the common variables
*
 include XP40-6:MS Fortran:printgraph.com
*
* Start of Subroutine
*
 menudata=toolbx(MENUSELECT,where) ! get selected menu data
 item4=menuselection(2)   ! convert to 4 bytes
 select case (menuselection(1))    ! which menu?
   case (File) ! File menu
     menuhandle=toolbx(GETMHANDLE,File)
     select case (menuselection(2))
       case(PSetUp)! Page Setup selected
         call prport(PROPEN)
        ok=prport(PRSTLDIALOG,prrechdl)
 call prport(PRCLOSE)
       case(PrintPic)! Print Hiblert curve selected
        call PrintIt
       case(Quit)! Quit selected
 stop
       case default
       end select
    case (Apple)   ! Apple menu
      menuhandle=toolbx(GETMHANDLE,Apple)
      select case(menuselection(2))
        case(About)! About item selected
          call toolbx(GETPORT,oldPort)
  dlg=toolbx(GETNEWDIALOG,200,0,-1)
  call toolbx(SETPORT,dlg)
  call FrameDItem
  ditemh=0
  while (ditemh<>1)
    call toolbx(MODALDIALOG,0,ditemh)
  repeat
  call toolbx(SETPORT,oldPort)
  call toolbx(DISPOSEDIALOG,dlg)
        case default ! desk acc selected
          call toolbx(GETITEM,menuhandle,item4,name)
  refnum=toolbx(OPENDSKACC,name)
        end select
    case (Edit)    ! Edit menu
      if (.not. toolbx(SYSTEMEDIT,item4-1)) then
      end if
    case default ! just playing with the mouse
 end select
 call toolbx(HILITEMENU,0)
 end

*
*  Drawing:  create hilbert picture of order n using
*            recursive techniques. This is an 
*adaptation of Michael Ackerman’s 
*algorithim given in Byte, June 1986, 
*pages 137-148.
*
 subroutine Drawing
 
 implicit none
*
* Reset the pathname to reflect your disk setup
*
include XP40-6:MS Fortran:Include Files:quickdraw.inc
include XP40-6:MS Fortran:Include Files:memory.inc
include XP40-6:MS Fortran:Include Files:misc.inc
include XP40-6:MS Fortran:Include Files:window.inc
*
* include common variables
*
include XP40-6:MS Fortran:printgraph.com

 call toolbx(SETCURSOR,watch)
 call toolbx(SETRECT,rect,0,0,342,512)
 pichandle=toolbx(OPENPICTURE,rect)
 call toolbx(FORECOLOR,colorpick)
 call toolbx(BACKCOLOR,colors(White))
 call toolbx(PENSIZE,linepick,linepick)
 rder=n
 dy=512/((2**rder-1)+12)
 turn=-1
 dx=0
 x=10
 y=10
 call toolbx(MOVETO,10,10)
 call Graph
 call toolbx(CLOSEPICTURE)

 call toolbx(FORECOLOR,colors(Black))
 call toolbx(PENSIZE,1,1)
 call toolbx(INITCURSOR)
 end


*
* Graph:  draws a hilbert curve 
*
 subroutine Graph

 implicit none
*
* Reset the pathname to reflect your disk setup
*
include XP40-6:MS Fortran:Include Files:quickdraw.inc
include XP40-6:MS Fortran:Include Files:window.inc
*
* include common variables
*
include XP40-6:MS Fortran:printgraph.com

 integer*4 temp

 rder=rder-1
 turn=-turn
 temp=dy
 dy=-turn*dx
 dx=turn*temp
 if (rder.gt.0) call Graph
 x=x+dx
 y=y+dy
 call toolbx(LINETO,x,y)
 turn=-turn
 temp=dy
 dy=-turn*dx
 dx=turn*temp
 if (rder.gt.0) call Graph
 x=x+dx
 y=y+dy
 call toolbx(LINETO,x,y)
 if (rder.gt.0) call Graph
 temp=dy
 dy=-turn*dx
 dx=turn*temp
 turn=-turn
 x=x+dx
 y=y+dy
 call toolbx(LINETO,x,y)
 if (rder.gt.0) call Graph
 temp=dy
 dy=-turn*dx
 dx=turn*temp
 turn=-turn
 rder=rder+1
 end  
*
* Subroutine to print out contents of graph window
*
 Subroutine PrintIt

 implicit none
*
* Reset the pathname to reflect your disk setup
*
include XP40-6:MS Fortran:Include Files:quickdraw.inc
include XP40-6:MS Fortran:Include Files:dialog.inc
include XP40-6:MS Fortran:Include Files:memory.inc
include XP40-6:MS Fortran:Include Files:misc.inc
include XP40-6:MS Fortran:Include Files:window.inc
include XP40-6:MS Fortran:Include Files:prport.inc
include XP40-6:MS Fortran:Include Files:prdefs.inc
*
* other local variables
*
 integer*2 qflag ! Variable to hold bjDocLoop flag
 integer*4 temp,i
 integer*2 srect(4),margins(4)
 integer*4 rPageptr
 logical ok
 integer*4 canproc
*
* variable for conversion to pascal type strings
*
 character*256 str255,str1
*
* print manager structures
*
 integer*4 theprport ! Pointer to printer grafport
 integer*1 thestrec(26) ! Status rec for PRPICFILE
*
* include common variables
*
include XP40-6:MS Fortran:printgraph.com
*
* start print job
*
 call toolbx(HLOCK,prrechdl)
 ok=.false.
 call prport(PROPEN)
 ok=prport(PRJOBDIALOG,prrechdl)
 if (ok) then
*
* set up idle proc
*
   call toolbx(GETPORT,oldPort)
   call toolbx(SETCURSOR,watch)
   canproc=ctlprc(ftrack,0)
   long(long(prrechdl)+prJob+pIdleProc)=canproc
   
   rPageptr=long(prrechdl)+prInfo+rPage
   call toolbx(BLOCKMOVE,rPageptr,toolbx(PTR, srect(1)),8)
   
   dlg=toolbx(GETNEWDIALOG,1010,0,-1)
   str1=str255(‘Hilbert Order ‘//char(48+n))
   call toolbx(PARAMTEXT,str1,’’,’’,’’)
   call toolbx(DRAWDIALOG,dlg)
   call toolbx(SETPORT,dlg)
   call FrameDItem

   call toolbx(INITCURSOR)
*
* start printing
*
   theprport = prport(PROPENDOC, prrechdl, 0, 0)
   if (prport(PRERROR) .NE. 0) then
     write(9,*) “Printer error “,prport(PRERROR)
     goto 10
   endif
   call prport(PROPENPAGE,theprport,0)
   if (prport(PRERROR) .NE. 0) then
     write(9,*) “Printer error “,prport(PRERROR)
     goto 20
   endif
   call toolbx(DRAWPICTURE,pichandle,rect)
20   call prport(PRCLOSEPAGE, theprport)
10   call prport(PRCLOSEDOC, theprport)
   qflag = byte(long(prrechdl)+prJob+bJDocLoop)
*
*  If the print method is spooled, the actual printing 
*still needs to be done.
*
   if ((qflag = bSpoolLoop) .AND. (prport(PRERROR) = 0)) then
     call prport(PRPICFILE, prrechdl, 0, 0, 0, toolbx(PTR, thestrec))
   endif

   if (prport(PRERROR) .NE. 0) then
     write(9,*) “Printer error “,prport(PRERROR)
   endif
   call toolbx(DISPOSEDIALOG,dlg)
   call toolbx(SETPORT,oldPort)
 endif
 call prport(PRCLOSE)
 call toolbx(HUNLOCK,prrechdl)
 end

*
*  Frame rounded rectangle, sets the default item
*
 subroutine FrameDItem

 implicit none
*
* Reset the pathname to reflect your disk setup
*
include XP40-6:MS Fortran:Include Files:quickdraw.inc
include XP40-6:MS Fortran:Include Files:dialog.inc
*
* include common variables
*
 include XP40-6:MS Fortran:printgraph.com
*
* local variables
*
 integer*4 dLog
 integer*2 iBox(4)
 integer*4 iBox4(4)
 integer*2 iType
 integer*4 iHandle
 integer*1 oldPenState(18)
 
 call toolbx(GETPENSTATE,oldPenState)
 call toolbx(GETDITEM,dlg,1,iType,iHandle,iBox)
 call toolbx(INSETRECT,iBox,-4,-4)
 call toolbx(PENSIZE,3,3)
 call toolbx(FRAMEROUNDRECT,iBox,16,16)
 call toolbx(SETPENSTATE,oldPenState)
 
 end
*
*  str255: converts a FORTRAN string to a 
*Pascal LSTRING
*
 character*256 function str255(string)
 character*(*) string
 
 str255 = char(len(trim(string)))//string

 end


* [This is the idleProc for the Print Manager used in the printit subsubroutine. 
Normally, a pointer to the arguments passed to a control proc routine 
by the toolbox is passed in argptr.  This is done since the glue routine 
used by ctlprc to interface the toolbox to FORTRAN has no way of knowing 
what kind of procedure this is (control actionProc, dialog filterProc, 
etc.), and therefore no way of knowing how many parameters to expect. 
 argptr points to the last argument (partCode) as pushed on the stack 
by the toolbox; preceding arguments are at higher addresses.]

      subroutine ftrack(argptr)

 implicit none   ! Declare all variables.
 integer argptr  ! Pointer to arguments.
 ! but there are none
 logical bool
 integer*2 item
 integer*4 cancelitem
 integer*4 dlgptr,toolbx
 integer*4 mDownMask,KeyDownMask,keyDown
 parameter (cancelitem=1)
 parameter (mDownMask=2,KeyDownMask=8,keyDown=3)
 
 integer*2 theEvent(8)
 integer*2 what
 integer*4 message
 integer*4 when
 integer*2 where(2)
 integer*2 modifiers 

*
* Reset the pathname to reflect your disk setup
*
include XP40-6:MS Fortran:Include Files:event.inc
include XP40-6:MS Fortran:Include Files:dialog.inc
include XP40-6:MS Fortran:Include Files:prport.inc
include XP40-6:MS Fortran:Include Files:prdefs.inc
 
 bool=toolbx(GETNEXTEVENT,mDownMask+KeyDownMask, theEvent)
 item=0
 if ((what=keyDown).and.(mod(message,256) = 13)) then
   item=cancelitem
 else if toolbx(ISDIALOGEVENT,theEvent) then
   bool=toolbx(DIALOGSELECT,theEvent,dlgptr,item)
 end if
 if (item=cancelitem) then
   call prport(PRSETERROR,128)! set abort error
 end if
 return
      end
!codeexamp
leend!codeexamplestart
{7]
* Listing 7
* file:  PrintGraph.com

*
* PrintGraph Fortran Program
*
* Copyright (c) 1987 Mark E. McBride
*                    211 N. University Ave.
*                    Oxford, OH  45056
*
* This file contains variable definitions
* that will be common to the main program and 
* the non-print related subroutines.
* These include most of the toolbox structures
* used throughout the program
*
*
* general and toolbox variables
*
 integer*4 toolbx! toolbx.sub interface
 integer*4 prport! print manager interface
 integer*4 ctlprc! Create toolbox callable procs.
 integer*4 n,dy,dx,x,y,turn,rder ! Hilbert curve variables
 integer track   ! Address of the track proc.
 integer ftrack  ! This keeps IMPLICIT NONE happy.

* Declare ftrack as a subroutine.
 external ftrack

*
* handles
*
 integer*4 menuhandle! handle to menu
 integer*4 pichandle ! handle to picture
 integer*4 oldPort ! handle to oldport
 integer*4 curshandle,cursptr ! handle to cursor
 integer*1 watch(68) ! watch cursor record
*
* print manager structures
*
 integer*4 prrechdl! Handle to print record
 integer*4 theprport ! Pointer to printer grafport
 integer*1 thestrec(26) ! Status rec PRPICFILE
*
* dialog structures
*
 integer*4 dlg,itemno,itemhdl ! general purpose dialog pointer
 integer*2 ditemh,itemtype! item hit in dialog
*
* event strucutures
*
 integer*2 eventrecord(8) ! overlying structure
 integer*2 what  ! type of event
 integer*4 message ! extra event information
 integer*4 when  ! time of event in 60ths of seconds
 integer*2 where(2)! mouse loc in global coordinates
 integer*2 modifiers ! mouse button and modkeys
*
* Menu and other selection constants
*
 integer*4 Apple,File,Edit
 integer*4 About
 integer*4 PSetUp,PrintPic,Quit
 integer*4 Undo,Cut,Copy,Paste,Clear,ShowClip
 integer*4 Black,White,Red,Green,Blue, Cyan,Magenta,Yellow
 integer*4 top,left,bottom,right
*
* Colors and line size
*
 integer*4 colors(8)
 integer*4 colorpick
 integer*4 linepick
*
* Rectangles for general use
*
 integer*2 rect(4),rect1(4),rect2(4),rect3(4)
*
* common variable sets
*
 common /set1/menuhandle,pichandle,rect,rect1, rect2,rect3,
     +  prrechdl,theprport,thestrec,dlg,itemno, itemhdl,ditemh,
     +  itemtype,eventrecord(8),toolbx,ctlprc, track,ftrack,
     +  prport,n,dy,dx,x,y,turn,rder,colorpick, linepick,
     +  curshandle,cursptr,watch,colors,oldPort

*
*  parameters
*
 parameter (top=1,left=2,bottom=3,right=4)
 parameter (Apple=29,File=30,Edit=31)
 parameter (About=1)
 parameter (PSetUp=1,PrintPic=2,Quit=4)
 parameter (Undo=1,Cut=3,Copy=4,Paste=5,Clear=6, ShowClip=8)
 parameter (Black=1,White=2,Red=3,Green=4,Blue=5, Cyan=6)
 parameter (Magenta=7,Yellow=8)

Link File

* This is the Link File
* for the PrintGraph Program
 
o PrintGraph
f PrintGraph apl
f prport.sub
f ctlprc.sub
f toolbx.sub
f reset.sub
l f77.rl
g
 
AAPL
$116.47
Apple Inc.
+0.16
MSFT
$47.98
Microsoft Corpora
-0.72
GOOG
$537.50
Google Inc.
+2.67

MacTech Search:
Community Search:

Software Updates via MacUpdate

Cobook 3.0.7 - Intelligent address book....
Cobook Contacts is an intuitive, engaging address book. Solve the problem of contact management with Cobook Contacts and its simple interface and powerful syncing and integration possibilities.... Read more
StatsBar 1.9 - Monitor system processes...
StatsBar gives you a comprehensive and detailed analysis of the following areas of your Mac: CPU usage Memory usage Disk usage Network and bandwidth usage Battery power and health (MacBooks only)... Read more
Cyberduck 4.6 - FTP and SFTP browser. (F...
Cyberduck is a robust FTP/FTP-TLS/SFTP browser for the Mac whose lack of visual clutter and cleverly intuitive features make it easy to use. Support for external editors and system technologies such... Read more
Maya 2015 - Professional 3D modeling and...
Maya is an award-winning software and powerful, integrated 3D modeling, animation, visual effects, and rendering solution. Because Maya is based on an open architecture, all your work can be scripted... Read more
Evernote 6.0.1 - Create searchable notes...
Evernote allows you to easily capture information in any environment using whatever device or platform you find most convenient, and makes this information accessible and searchable at anytime, from... Read more
calibre 2.11 - Complete e-library manage...
Calibre is a complete e-book library manager. Organize your collection, convert your books to multiple formats, and sync with all of your devices. Let Calibre be your multi-tasking digital... Read more
Herald 5.0.1 - Notification plugin for M...
Note: Versions 2.1.3 (for OS X 10.7), 3.0.6 (for OS X 10.8), and 4.0.8 (for OS X 10.9) are no longer supported by the developer. Herald is a notification plugin for Mail.app, Apple's Mac OS X email... Read more
Firetask 3.7 - Innovative task managemen...
Firetask uniquely combines the advantages of classical priority-and-due-date-based task management with GTD. Stay focused and on top of your commitments - Firetask's "Today" view shows all relevant... Read more
TechTool Pro 7.0.6 - 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
PhotoDesk 3.0.1 - Instagram client for p...
PhotoDesk lets you view, like, comment, and download Instagram pictures/videos! (NO Uploads! / Image Posting! Instagram forbids that! AND you *need* an *existing* Instagram account). But you can do... Read more

Latest Forum Discussions

See All

Ubisoft Gives Everyone Two New Ways to E...
Ubisoft Gives Everyone Two New Ways to Earn In-Game Stuff for Far Cry 4 Posted by Jessica Fisher on November 21st, 2014 [ permalink ] | Read more »
Golfinity – Tips, Tricks, Strategies, an...
Dig this: Would you like to know what we thought of being an infinite golfer? Check out our Golfinity review! Golfinity offers unlimited ways to test your skills at golf. Here are a few ways to make sure your score doesn’t get too high and your... | Read more »
Dark Hearts, The Sequel to Haunting Meli...
Dark Hearts, The Sequel to Haunting Melissa, is Available Now Posted by Jessica Fisher on November 21st, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Meowza! Toyze Brings Talking Tom to Life...
Meowza! | Read more »
Square Enix Announces New Tactical RPG f...
Square Enix Announces New Tactical RPG for Mobile, Heavenstrike Rivals. Posted by Jessica Fisher on November 21st, 2014 [ permalink ] With their epic stories and gorgeous graphics, | Read more »
Quest for Revenge (Games)
Quest for Revenge 1.0.0 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0.0 (iTunes) Description: The great Kingdom of the west has fallen. The gods ignore the prayers of the desperate. A dark warlord has extinguished... | Read more »
Threadz is a New Writing Adventure for Y...
Threadz is a New Writing Adventure for You and Your Friends Posted by Jessica Fisher on November 21st, 2014 [ permalink ] In the tradition of round-robin storytelling, | Read more »
SteelSeries Stratus XL Hardware Review
Made by: SteelSeries Price: $59.99 Hardware/iOS Integration Rating: 4 out of 5 stars Usability Rating: 4.5 out of 5 stars Reuse Value Rating: 4.25 out of 5 stars Build Quality Rating: 4.5 out of 5 stars Overall Rating: 4.31 out of 5 stars | Read more »
ACDSee (Photography)
ACDSee 1.0.0 Device: iOS iPhone Category: Photography Price: $1.99, Version: 1.0.0 (iTunes) Description: Capture, perfect, and share your photos with ACDSee. The ACDSee iPhone app combines an innovative camera, a powerful photo... | Read more »
ProTube for YouTube (Entertainment)
ProTube for YouTube 2.0.2 Device: iOS Universal Category: Entertainment Price: $1.99, Version: 2.0.2 (iTunes) Description: ProTube is the ultimate, fully featured YouTube app. With it's highly polished design, ProTube offers ad-free... | Read more »

Price Scanner via MacPrices.net

Save up to $400 with Apple refurbished 2014 1...
The Apple Store has restocked Apple Certified Refurbished 2014 15″ Retina MacBook Pros for up to $400 off the cost of new models. An Apple one-year warranty is included with each model, and shipping... Read more
New 13-inch 1.4GHz MacBook Air on sale for $8...
 Adorama has the 2014 13″ 1.4GHz/128GB MacBook Air on sale for $899.99 including free shipping plus NY & NJ tax only. Their price is $100 off MSRP. B&H Photo has the 13″ 1.4GHz/128GB MacBook... Read more
Apple Expected to Reverse Nine-Month Tablet S...
Apple and Samsung combined accounted for 62 percent of the nearly 36 million branded tablets shipped in 3Q 2014, according to early vendor shipment share estimates from market intelligence firm ABI... Read more
Stratos: 30 Percent of US Smartphone Owners t...
Stratos, Inc., creator of the Bluetooth Connected Card Platform, has announced results from its 2014 Holiday Mobile Payments Survey. The consumer survey found that nearly one out of three (30 percent... Read more
2014 1.4GHz Mac mini on sale for $449, save $...
 B&H Photo has lowered their price on the new 1.4GHz Mac mini to $449.99 including free shipping plus NY tax only. Their price is $50 off MSRP, and it’s the lowest price available for this new... Read more
Check Apple prices on any device with the iTr...
MacPrices is proud to offer readers a free iOS app (iPhones, iPads, & iPod touch) and Android app (Google Play and Amazon App Store) called iTracx, which allows you to glance at today’s lowest... Read more
64GB iPod touch on sale for $249, save $50
Best Buy has the 64GB iPod touch on sale for $249 on their online store for a limited time. Their price is $50 off MSRP. Choose free shipping or free local store pickup (if available). Sale price for... Read more
15″ 2.2GHz Retina MacBook Pro on sale for $17...
 B&H Photo has the 2014 15″ 2.2GHz Retina MacBook Pro on sale for $1799.99 for a limited time. Shipping is free, and B&H charges NY sales tax only. B&H will also include free copies of... Read more
New Logitech AnyAngle Case/Stand Brings Flexi...
Logitec has announced the newest addition to its suite of tablet products — the Logitech AnyAngle. A protective case with an any-angle stand for iPad Air 2 and all iPad mini models, AnyAngle is the... Read more
Notebook PC Shipments Rise Year-Over-Year as...
According to preliminary results from the upcoming DisplaySearch Quarterly Mobile PC Shipment and Forecast Report, the global notebook PC market grew 10 percent year-over-year in Q3’14 to 49.4... Read more

Jobs Board

*Apple* Solutions Consultant (ASC)- Retail S...
**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, *Apple* Financial Services...
**Job Summary** Apple Financial Services (AFS) offers consumers, businesses and educational institutions ways to finance Apple purchases. We work with national and Read more
*Apple* Store Leader Program - College Gradu...
Job Description: Job Summary As an Apple Store Leader Program agent, you can continue your education as you major in the art of leadership at the Apple Store. You'll Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
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
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.