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  

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 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 Returns 0 if successful; -1 if not.
c Original version:
c Language: Absoft MacFortran.
c Charles R. Denham, MathWorks.
c Ported to Language Systems FORTRAN by s.herskovitz
implicit none
c Load the Toolbox definition files
character*(*) filename
string*255 name
integer*4 setmat
integer*2 vref,err
parameter (vref=0)
record /FInfo/ myfinfo
setmat = -1
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

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

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.