Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
PAR
Posts:
273
Registered:
12/7/04
|
|
Matlab Icon
Posted:
Aug 19, 1996 1:53 PM
|
|
I'm trying to set the Matlab icon within a FORTRAN program by using some code that I got online but some time ago (i.e. I don't know which version of Matlab is supported). Problem is that it doesn't work, i.e. icon is plain untitled document. I'm using a PowerMac running Language Systems FORTRAN and MPW Pro. Does anybody know what's wrong?
function setmat(filename) c c Sets Macintosh file type and creator for a MATLAB MAT-file, c so the correct icon will get attached to it. MATLAB ignores c MAT-files that have not been set properly. c c Returns 0 if successful; -1 if not. c c Original version: c Language: Absoft MacFortran. c Charles R. Denham, MathWorks. c c Ported to Language Systems FORTRAN by s.herskovitz c implicit none c c Load the Toolbox definition files c character*(*) filename string*255 name integer*4 setmat integer*2 vref,err parameter (vref=0) record /FInfo/ myfinfo c setmat = -1 c name = trim( filename ) err = GetFInfo( name, vref, %ref(myfinfo) ) if (err = noErr) then myfinfo.fdType = 'MATW' myfinfo.fdCreator = 'MATL' err = SetFInfo( name, vref, myfinfo ) if (err = noErr) setmat = 0 end if c return end c
|
|
|
|