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
$100.89
Apple Inc.
-0.65
MSFT
$45.01
Microsoft Corpora
-0.17
GOOG
$577.86
Google Inc.
-2.34

MacTech Search:
Community Search:

Software Updates via MacUpdate

BBEdit 10.5.12 - Powerful text and HTML...
BBEdit is the leading professional HTML and text editor for the Mac. Specifically crafted in response to the needs of Web authors and software developers, this award-winning product provides a... Read more
Microsoft Office 2011 14.4.4 - Popular p...
Microsoft Office 2011 helps you create professional documents and presentations. And since Office for Mac 2011 is compatible with Office for Windows, you can work on documents with virtually anyone... Read more
TextWrangler 4.5.10 - Free general purpo...
TextWrangler is the powerful general purpose text editor, and Unix and server administrator's tool. Oh, and also, like the best things in life, it's free. TextWrangler is the "little brother" to... Read more
BitTorrent Sync 1.4.72 - Sync files secu...
BitTorrent Sync allows you to sync unlimited files between your own devices, or share a folder with friends and family to automatically sync anything. File transfers are encrypted. Your information... Read more
Cyberduck 4.5.2 - FTP and SFTP browser....
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
Tinderbox 6.0.3 - Store and organize you...
Tinderbox is a personal content management assistant. It stores your notes, ideas, and plans. It can help you organize and understand them. And Tinderbox helps you share ideas through Web journals... Read more
Adobe Photoshop CC 2014 15.1.0 - Profess...
Photoshop CC 2014 is available as part of Adobe Creative Cloud for as little as $19.99/month (or $9.99/month if you're a previous Photoshop customer). Photoshop CS6 is still available for purchase (... Read more
Adobe InDesign CC 2014 10.0.0.70 - Profe...
InDesign CC 2014 is available as part of Adobe Creative Cloud for as little as $19.99/month (or $9.99/month if you're a previous InDesign customer). InDesign CS6 is still available for purchase (... Read more
Adobe InCopy CC 2014 10.0.0.70 - Create...
InCopy CC 2014 is available as part of Adobe Creative Cloud for as little as $19.99/month (or $9.99/month if you're a previous InCopy customer). InCopy CS6 is still available for purchase (without a... Read more
Adobe Illustrator CC 2014 18.0 - Profess...
Illustrator CC 2014 is available as part of Adobe Creative Cloud for as little as $19.99/month (or $9.99/month if you're a previous Illustrator customer). Illustrator CS6 is still available for... Read more

Latest Forum Discussions

See All

Appointment With F.E.A.R. (Games)
Appointment With F.E.A.R. 1.02 Device: iOS Universal Category: Games Price: $2.99, Version: 1.02 (iTunes) Description: Travel back to the 1980s as a superpowered defender of justice in this all-new edition of Steve Jackson's... | Read more »
8bit Doves (Games)
8bit Doves 1.0 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0 (iTunes) Description: “I dove it” – Pocket Gamer “They told me I could be whatever I want, so I became a flying hobo” – Cactus Wolf “Let’s you crash into... | Read more »
Madden NFL Mobile Review
Madden NFL Mobile Review By Blake Grundman on August 26th, 2014 Our Rating: :: FINALLY GETS IT RIGHTUniversal App - Designed for iPhone and iPad It looks like EA Sports has finally discovered how to tread the line between free-to-... | Read more »
Superhero Workout Review
Superhero Workout Review By Jennifer Allen on August 26th, 2014 Our Rating: :: SUPERCHARGEDUniversal App - Designed for iPhone and iPad Want a workout with a kind of story tied into it? Superhero Workout is what you’re after.   | Read more »
Star Wars: Commander Review
Star Wars: Commander Review By Jennifer Allen on August 26th, 2014 Our Rating: :: CLASH OF THE FORCEUniversal App - Designed for iPhone and iPad It’s a lot like Clash of Clans, but the use of the Star Wars license means you don’t... | Read more »
Ridge Racer Slipstream Update Adds New C...
Ridge Racer Slipstream Update Adds New Cars, Challenges, and Tracks Posted by Ellis Spice on August 26th, 2014 [ permalink ] | Read more »
Infinity Blade III: Kingdom Come, the Fi...
Infinity Blade III: Kingdom Come, the Final Update, Set to Arrive September Posted by Ellis Spice on August 26th, 2014 [ permalink ] | Read more »
Furious Climber Review
Furious Climber Review By Jordan Minor on August 26th, 2014 Our Rating: :: REACH FOR THE STARSUniversal App - Designed for iPhone and iPad Furious Climber’s rough packaging can’t ruin its awesomely awkward gameplay   | Read more »
Don’t Forget the Milk – Let Heap, the Gr...
Don’t Forget the Milk – Let Heap, the Grocery List App, Help You Stay Organized While Shopping Posted by Jessica Fisher on August 26th, 2014 [ permalink ] | Read more »
MZR Review
MZR Review By Rob Thomas on August 26th, 2014 Our Rating: :: MAZED AND CONFUSEDUniversal App - Designed for iPhone and iPad How quickly can you escape from MZR’s neon mazes of doom? Why not find out for yourself?   | Read more »

Price Scanner via MacPrices.net

Life Inventory iOS Apps – Learn to Know Thyse...
James Hollender’s Life Inventory apps s are now on sale with 20% off thru Labor Day, 09/01/2014. This is a great opportunity to get started on that Moral Inventory you’ve been putting off doing for... Read more
Pocket Watch, LLC. Reveals Cloud Server For P...
Beaumont, Texas based Pocket Watch, LLC. has announced the availability of its new ActivePrint Cloud Server Powered by Raspberry Pi. With this small standalone box almost any USB printer or available... Read more
902it Simplifies Area Code Changes For Nova S...
The east coast Canadian provinces of Nova Scotia and Prince Edward Island are phasing in 10 digit telephone dialing, to be fully in place by November, in order to accommodate a second area code to... Read more
Boomerang iPad Stand Mounts Your iPad Anywher...
Boomerang, a Mountable Stand with Multiple Viewing Angles, is now available for iPad Air. Boomerang combines several functions that aim to expand your iPad’s potential in one, elegant product. The... Read more
Retina MacBook Pros available starting at $10...
The Apple Store has Apple Certified Refurbished 13″ and 15″ MacBook Pros available starting at $929. Apple’s one-year warranty is standard, and shipping is free: - 13″ 2.5GHz MacBook Pros (4GB RAM/... Read more
Apple 27-inch Thunderbolt Display (refurbishe...
The Apple Store has Apple Certified Refurbished 27″ Thunderbolt Displays available for $799 including free shipping. That’s $200 off the cost of new models. Read more
Apple offers free $25 iTunes gift card with p...
The Apple Store is offering a free $25 iTunes Gift Card with the purchase of a $99 Apple TV for a limited time. Shipping is free. Read more
Apple’s 2014 Back to School promotion: $100 g...
 Apple’s 2014 Back to School promotion includes a free $100 App Store Gift Card with the purchase of any new Mac (Mac mini excluded), or a $50 Gift Card with the purchase of an iPad or iPhone,... Read more
iPhone Camera vs. Top Tier DSLR In Picture Qu...
If you’ve wondered just how good the iPhone 5s’s 8 megapixel rear-facing camera is in terms of image quality, The Verge has posted an excellent feature that should remove any ambiguity on the matter... Read more
Apple Announces Limited iPhone 5 Defective Ba...
Apple says it has determined that a very small percentage of iPhone 5 devices may suddenly experience shorter battery life or need to be charged more frequently. The affected iPhone 5 units were sold... 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
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
Position Opening at *Apple* - Apple (United...
**Job Summary** Being a Business Manager at an Apple Store means you're the catalyst for businesses to discover and leverage the power, ease, and flexibility of Apple Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.