Provato il codice seguente con OOo1.9.128 (en) e OOo1.1.4 (it-PLIO) su GNU/Linux.
Non riscontro nessun problema.
Tu stai usando Windows o Linux ?

Sto usando windows.
Come avevo accennato non avevo avuto tempo per fare molte prove, ma forse ho capito quando si verifica! Non mi ricordavo che la funzione che richiamo dal print a sua volta chiama un'altra sub che scrive su un secondo file (sempre aperto) (so di essere un po' contorto :-)), se tolgo questa sub funziona correttamente.

In pratica se si toglie la chiamata a "test2" in questo esempio ritorna come il tuo e funziona, se la si lascia visualizza il "dialog" con il testo andrebbe scritto nel file (almeno a me):

private iFileNoAlwaysOpen as integer
private sFileNameAlwaysOpen as string

Sub ExampleWorkWithAFile
Dim iNumber As Integer
Dim sLine As String
Dim aFile As String
Dim sMsg as String

   iFileNoAlwaysOpen = FreeFile
   sFileNameAlwaysOpen = "/home/paolo/data2.txt"
   Open sFileNameAlwaysOpen For Output As #iFileNoAlwaysOpen

   aFile = "/home/paolo/data.txt"
   iNumber = Freefile
   Open aFile For Output As #iNumber
   Print #iNumber, "This is a line of text" & test & "pippo"
   Print #iNumber, "This is another line of text"
   Close #iNumber
End Sub

function test
   test2
   test = " ciao "
end function

function test2
   Print #iFileNoAlwaysOpen, "This is another line of text"
end function


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Rispondere a