[Gambas-user] reading files

Shane buster6seven at ...626...
Sun Jul 16 12:57:57 CEST 2017


given this example

PRIVATE SUB BinaryRead(FilePath AS String)
   DIM binaryFile AS File
   DIM i AS Integer
   DIM b AS Byte
   DIM s AS Short
   DIM s1 AS String
   DIM s2 AS String
   ' Read binary file
   binaryFile = OPEN FilePath FOR READ
   READ #binaryFile, i
   READ #binaryFile, b
   READ #binaryFile, s
   READ #binaryFile, s1
   READ #binaryFile, s2
   CLOSE #binaryFile
   ' Display results
   PRINT i
   PRINT b
   PRINT s
   PRINT s1
   PRINT s2
END


is there a way for gambas to read a struct of all these variables
in one read ?





More information about the User mailing list