summaryrefslogtreecommitdiff
path: root/modules/mexlib/examples/interface/foof.F
blob: 653b7118b6944edd3c1f9da8d46e9d7801b47581 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
      subroutine mexfunction(nlhs,plhs,nrhs,prhs)
c     simple example of fortran mex.
c     usage a=pipo3(2)
      integer*4 plhs(*), prhs(*)
c     FOR 64 bits MACHINES SHOULD BE integer*8
      integer nlhs, nrhs
c
      if (nrhs.ne.1) then
         call mexerrmsgtxt('Requires ONE input')
      endif
      if (nlhs.ne.1) then
         call mexerrmsgtxt('Requires ONE output!')
      endif
      plhs(1)=prhs(1)
      return
      end