From: Daniel Stenning <[EMAIL PROTECTED]>
Date: Thu, 14 Sep 2006 22:33:04 +0100

 Currently to use pointers for speed we would do something like :
( or use malloc() )

  dim m as new MemoryBlock(800)
  dim p as ptr = m.Ptr(0)

I'm not using RB2007 or whatever the number is, but I'm curious... Does this ptr allow you to corrupt the RAM?

Without this "feature", I don't think I'd be interested ;)

Also, will RB allow for typed pointers?

So you can do stuff like this:

dim c as uInt8
dim p as ptr(uint8) = m.ptr(0)

c = *p++ // :)

Also, seeing as RB is heading down this very perilious and "unsafe" path...

Shouldn't RB add some kind of "safe" keyword? I think MS's C# has such a keyword. It lets you distinguish between code which cannot possibly corrupt RAM, and code which could.

The way RB is heading, one of the biggest complaints about plugins, which is the idea that they are unstable... RB code itself will be causing such RAM corruptions with a proper pointer class.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to