No, I'm sorry
It works only on numeric arrays
In general STAT module was intended to work with numeric arrays
ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64
No, I'm sorry
It works only on numeric arrays
In general STAT module was intended to work with numeric arrays
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Hi Sebastian,
I think you can perform duplicate for example this way:
uses "Console" type Vector3D x as float32 y as float32 end type dim arr(3) as Vector3D dim arr_copy(3) as Vector3D int32 i for i = 1 to ubound(arr) arr(i).x = i arr(i).y = i next ' This is like "copy bytes from start of the array, of total length calculated like number-of-elements * size-of-element and store them to string" ' VarPtr is "variable pointer" string binary = peek$(varptr(arr(1)), CountOf(arr(1))*SizeOf(arr(1))) ' This is like - "paste the binary string at place starting at beginning of arr_copy" poke$(varptr(arr_copy(1)), binary) printl "Source array:" for i = 1 to ubound(arr) printl arr(i).x, arr(i).y next printl printl "Copied array:" for i = 1 to ubound(arr) printl arr_copy(i).x, arr_copy(i).y next waitkey
Petr
Last edited by Petr Schreiber; 24-10-2019 at 23:21.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Thanks both,
Eros I think the core ARRAY series functions may benefit of such ARRAY COPY and ARRAY CLONE functions.
ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64
That would be nice!
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Bookmarks