VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Swap Variables 12 times Faster

Bradley Liang  (6 Submissions)   String Manipulation   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

Swap Variable1 for Variable2 using API, this is usefull for creating data processing programs with many stored variables. See Info below

Inputs
2 variables

Returns
2 variables swapped

Side Effects
Eats 4 bytes of memory <-- no biggie

API Declarations
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Dest As Any, Source As Any, ByVal lNumBytes As Long)

Rate Swap Variables 12 times Faster (4(4 Vote))
Swap Variables 12 times Faster.bas

Swap Variables 12 times Faster Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters