Issue 18639

Summary: Using the PUT/GET statements in binary mode does not get bytes from binary files.
Product: udk Reporter: Unknown <non-migrated>
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 1.1 RC3Keywords: oooqa
Target Milestone: AOO PleaseHelp   
Hardware: PC   
OS: Windows 2000   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description Unknown 2003-08-25 16:07:40 UTC
Using the PUT and GET statements does not return byte values from a binary file.

Sub Main
  DIM CountFileName As String
  DIM FValue as Variant  
  ' File Name to Open for conversion into spreadsheet
  CountFileName = "C:\DATA\LOG-117A"

  If NOT FileExists(CountFileName) Then
    Msgbox(CountFileName & " does NOT exists", 64, "Warning")
    exit sub
  End If
  iNum = FreeFile
  OPEN CountFileName for binary ACCESS READ as #iNum  

  GET #iNum,,FValue  ' With FValue declared as Variant This line fails
                     ' If FVAlue is declared as Integer this line works but
                     ' Returns two bytes from the file.
Comment 1 kay.ramme 2003-08-27 08:21:48 UTC
Andreas, please have a look at this and target apropriately.
Comment 2 ab 2003-09-01 13:19:48 UTC
-> OOo 2.0
Comment 3 christof.pintaske 2004-06-17 16:48:30 UTC
cp: retargeted to Office-Later due to limited ressources
Comment 4 ab 2005-07-28 10:04:53 UTC
This task is related to #i17825 "basic: where is the Byte type?"
as the size of the written type decides about the byte count.
Comment 5 Marcus 2017-05-20 11:29:40 UTC
Reset assigne to the default "".