Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Various code questions
#4
#3) This is generally a way to efficiently copy one variable or block of memory to another. Where we see this used the most is if we want to copy ArrayA() over into ArrayB() for whatever reason. Now, we could write code such as:

FOR i = LBOUND(ArrayA) TO UBOUND(ArrayA)
ArrayB(i) = ArrayA(i)
NEXT

But the above would copy one element at a time until it copied the whole array. The _MEMPUT as you have shown it, would copy the *whole* array all at once from ArrayA to ArrayB, with one pass, making it a whole lot faster and more efficient.
Reply


Messages In This Thread
Various code questions - by james2464 - 08-17-2022, 01:57 PM
RE: Various code questions - by mnrvovrfc - 08-17-2022, 02:09 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 02:09 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 02:13 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 02:21 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 02:30 PM
RE: Various code questions - by OldMoses - 08-17-2022, 04:55 PM
RE: Various code questions - by james2464 - 08-17-2022, 06:30 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 06:35 PM
RE: Various code questions - by james2464 - 08-17-2022, 06:43 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 06:53 PM
RE: Various code questions - by Kernelpanic - 08-17-2022, 08:32 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 09:25 PM
RE: Various code questions - by Kernelpanic - 08-18-2022, 01:31 PM



Users browsing this thread: 2 Guest(s)