more memory bank options

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ford escort.

copybank source,offset,dest,offset,lenght
where dest can be in the src range to move bloc of data in a memory bank
exemple
copybank *buffer,50,*buffer,49,50
to move the 50 bytes at offset 50 of a memorybank to the offset 49


42...42...42...42...42...42...42...42...
don't forget a plastic bag and a towel
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

You can do it easely by using the current CopyMemory() function:

Code: Select all

 
CopyMemory(UseMemoryBank(0)+Offset, UseMemoryBank(1)+Offset, Length)
BTW, All MemoryBank function will be renamed in the next release (I don't like the BANK keyword anymore ). AllocateMemoryBank() will be AllocateMemory() etc..


Fred - AlphaSND


Edited by - fred on 14 October 2001 13:18:24
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ford escort.

oh i don't noticed this command ... sorry..

42...42...42...42...42...42...42...42...
don't forget a plastic bag and a towel
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

Hey Fred,

How come when I try this I get a
CopyMemory() is not a Function,Array or LinkedList

???
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

How come when I try this I get a
CopyMemory() is not a Function,Array or LinkedList
use underline at end of (API)function:
CopyMemory_()

Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

Sorry... both give the exact same error message. (I'm using PB v2.50)
Post Reply