Re: [Gambas-user] Pointer-Memory Question

2012-02-03 Thread nando
e.net Sent: Fri, 03 Feb 2012 15:13:57 +0100 Subject: [Gambas-user] Pointer-Memory Question > What is wrong in this code ? > > Public Sub Button1_Click() > > Dim f, r As Single > Dim pPtr As Pointer > Dim strm As Stream > > f = 1 / 3 > > pPtr = Alloc(1

Re: [Gambas-user] Pointer-Memory Question

2012-02-03 Thread Wally
sure :) thx On Friday, February 03, 2012 15:42:25 Benoît Minisini wrote: > Le 03/02/2012 15:13, Wally a écrit : > > What is wrong in this code ? > > > > Public Sub Button1_Click() > > > > Dim f, r As Single > > Dim pPtr As Pointer > > Dim strm As Stream > > > >f = 1 / 3 > > > >pPtr

Re: [Gambas-user] Pointer-Memory Question

2012-02-03 Thread Benoît Minisini
Le 03/02/2012 15:13, Wally a écrit : > > What is wrong in this code ? > > Public Sub Button1_Click() > > Dim f, r As Single > Dim pPtr As Pointer > Dim strm As Stream > >f = 1 / 3 > >pPtr = Alloc(1, 4) 'alloc 4 * 1 Byte for single > >strm = Memory pPtr For Read Write > >

[Gambas-user] Pointer-Memory Question

2012-02-03 Thread Wally
What is wrong in this code ? Public Sub Button1_Click() Dim f, r As Single Dim pPtr As Pointer Dim strm As Stream f = 1 / 3 pPtr = Alloc(1, 4)'alloc 4 * 1 Byte for single strm = Memory pPtr For Read Write Write #strm, f As Single r = Read #strm As S