But if i write,

iA = Integer@(pPointer)
Print iA

then iA gets the value 10.

why is that?

what's the difference between
iA = Read #hMemory As Integer
iA = Integer@(pPointer)

?
-- 
Regards,
Demosthenes Koptsis.
--- Begin Message ---
Hello, 
i remake an example for pointers in Gambas3-svn3432, ubuntu 10.04 LTS,
AMD64

The example is the next:

-------------------------
' Gambas module file

Public Sub Main()

Dim pPointer As Pointer
Dim hMemory As Stream
Dim iA As Integer

pPointer = Alloc(SizeOf(gb.Integer))
hMemory = Memory pPointer For Read Write

Write #hMemory, 10 As Integer
iA = Read #hMemory As Integer

Print iA

Free(pPointer)

End
-------------------------

the iA var when it prints is not 10 but something else like 0 or 32621
or similar.

What am i doing wrong?



-- 
Regards,
Demosthenes Koptsis.

--- End Message ---
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to