Greetings all, I am trying to write some simple binary data to a file being ~ Integers 1 - 5000
I keep getting this error [Error: Type missmatch : wanted string , got integer instead.] So I copied the example from <http://gambasdoc.org/help/lang/write> as below. This code comes up with the same error ? DIM binaryFile AS File DIM i AS Integer = 10 DIM b AS Byte = 4 DIM s AS Short = 23 DIM s1 AS String = "This is string 1" DIM s2 AS String = "Another string" ' Open as create so we get a new file binaryFile = OPEN FilePath FOR CREATE WRITE #binaryFile, i '<<----------<<<<<< Error occurs here. WRITE #binaryFile, b WRITE #binaryFile, s WRITE #binaryFile, s1 WRITE #binaryFile, s2 CLOSE #binaryFile Confirmed I have write access : changed WRITE to use a string variable and it works fine. Changed to Gambas 2.22 and same code worked as it should, - able to write & read. Can someone else please test. Thanks in advance. Regards, Ian Roper Perth Western Australia. ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user