Opened 12 years ago

Closed 12 years ago

#5912 closed defect (fixed)

[with patch; positive review] %fortran mode is broken in the notebook

Reported by: was Owned by: boothby
Priority: major Milestone: sage-3.4.2
Component: notebook Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Attachments (1)

trac_5912.patch (711 bytes) - added by was 12 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by was

Here's how to test the attached patch:

Untitled
system:sage

{{{id=69|
%fortran

C FILE: FIB1.F
      SUBROUTINE FIB(A,N)
C
C     CALCULATE FIRST N FIBONACCI NUMBERS
C
      INTEGER N
      REAL*8 A(N)
      DO I=1,N
         IF (I.EQ.1) THEN
            A(I) = 0.0D0
         ELSEIF (I.EQ.2) THEN
            A(I) = 1.0D0
         ELSE 
            A(I) = A(I-1) + A(I-2)
         ENDIF
      ENDDO
      END
C END FILE FIB1.F
///

None

{{{id=70| import numpy n = numpy.array(range(10),dtype=float) fib(n) / }}}

{{{id=71| n /

array([ 0., 1., 1., 2., 3., 5., 8., 13., 21., 34.]) }}}

Changed 12 years ago by was

comment:2 Changed 12 years ago by was

  • Summary changed from %fortran mode is broken in the notebook to [with patch; needs review] %fortran mode is broken in the notebook

comment:3 Changed 12 years ago by cswiercz

  • Description modified (diff)
  • Summary changed from [with patch; needs review] %fortran mode is broken in the notebook to [with patch; positive review] %fortran mode is broken in the notebook

comment:4 Changed 12 years ago by cswiercz

  • Description modified (diff)

Works well!

I noticed that it only works with Fortran 77 code. Not a bug, really, but Fortran 95 / 2003 seem to be much more popular in the applied sciences world. In the future it would be

comment:5 Changed 12 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from new to closed

Merged in Sage 3.4.2.rc0.

Cheers,

Michael

Note: See TracTickets for help on using tickets.