[Libreoffice-bugs] [Bug 119102] BASIC OPEN FOR BINARY does not delete existing file

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Sep 2 05:50:16 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=119102

Jay Michael <jmichael_ll at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |UNCONFIRMED
     Ever confirmed|1                           |0

--- Comment #3 from Jay Michael <jmichael_ll at yahoo.com> ---
(In reply to Buovjaga from comment #1)

2. Write a macro in LibreOffice that opens "x.txt" FOR BINARY, writes a few
bytes, and closes.

sub wb( fn as integer, byteval as integer )
  dim v as byte
  v = byteval
  put #fn,, v
end sub

Sub Main
const fname = "c:\users\jay\x.txt"
dim fn as integer
fn = freefile()
open fname for binary as #fn
wb(fn,asc("n"))
wb(fn,asc("e"))
wb(fn,asc("w"))
wb(fn,13)
wb(fn,10)
close fn
End Sub

     Change "fname" to point to your own home directory.
     Do not have "x.txt" open in LibreOffice while running the macro "Main".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180902/5b9e5373/attachment-0001.html>


More information about the Libreoffice-bugs mailing list