Help save net neutrality! Learn more.
Close

#601 Cannot add to a file from subroutine

v4.0beta
closed
8
2012-08-14
2009-04-13
No

Lines written to a file from a subroutine disappear in the 4.00beta. Scenario:

Program foo.rex is writing a file, and has (the equivalent of):

file='temp.html'
call lineout file, 'line 1'
call lineout file, 'line.2'

call standard_footer file

standard_footer.rex is an external subroutine which has (the equivalent of):

parse arg file
call lineout file, 'footer line 1'
call lineout file, 'footer line 2'
call lineout file -- close the file
return

This works in 3.20 (the file ends up with four lines), but in the 4.00beta the last two lines vanish.

Adding

call lineout file

to the first program just before the call to standard_footer fixes the problem in this instance, but I have many many cases where pieces of a file are written from multiple subroutines ...

Discussion

  • Rick McGuire

    Rick McGuire - 2009-04-13

    Committed revision 4361.

     
  • Mike Cowlishaw

    Mike Cowlishaw - 2009-04-16

    This (and more complex variation discovered later) confirmed fixed. Thnx.

     


Anonymous

Cancel  Add attachments