Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CLEAR
#2
There is a faster way, use memset:

Code:
#include <memcopy.bas>

PROCEDURE CLEAR (v)
    MEMCOPY(ADDRESS(v), 0, SIZE(v))
END PROCEDURE

Please, try this and tell me if it works.

Also, I'm curious: How did you implement ADDRESS(v) and SIZE(v), they can be useful and included in the compiler.
(The next version will have changes and will update the standard library).
Reply


Messages In This Thread
CLEAR - by zarsoft - 03-04-2023, 03:46 PM
RE: CLEAR - by boriel - 03-06-2023, 08:16 AM
RE: CLEAR - by zarsoft - 03-06-2023, 09:44 AM
RE: CLEAR - by boriel - 03-06-2023, 11:13 AM
RE: CLEAR - by zarsoft - 03-06-2023, 11:38 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)