Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Matlab Icon
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
PAR

Posts: 273
Registered: 12/7/04
Matlab Icon
Posted: Aug 19, 1996 1:53 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.