And Here a little Speed Test adapted from oxygen Site
'
' - short "proment" module legend for simple examples using thinbasic:
' - a) you need only a string to start, b) code example with usual types, dim, float, long, string, arrays etcpp,
' - c) "ha_basis" at the end and "ha_drive2" you need for execution the script example that's all
' - jan-feb2024
'
uses "proment"
string pros
pros="
'timer example with array redim
Type SYSTEMTIME
word wYear
word wMonth
word wDayOfWeek
word wDay
word wHour
word wMinute
word wSecond
word wMilliseconds
End Type
Declare GetSystemTime LIB "KERNEL32.DLL" ( SYSTEMTIME *lpSystemTime )
Declare GetLocalTime Lib "kernel32.dll" ( ByRef lpSystemTime As SYSTEMTIME )
function TimeLapsesMis(SYSTEMTIME *ti1,*ti2) as long
===============================================
'<60 second timer
long tad = ti2.wMilliSeconds-ti1.wMilliseconds+
((ti2.wSecond-ti1.wSecond)*1000)+
((ti2.wMinute-ti1.wMinute)*60000)+
((ti2.wHour-ti1.wHour)*3600000)+
((ti2.wDayOfWeek-ti1.wDayOfWeek)*86400000)
'
'end of week crossing
if tad<0 then tad+=604800000
return tad
end function
'---Variables declaration
dim MaxCount as long
maxCount = 1e7 '10 million
'maxCount = 10000000
SYSTEMTIME thisTime0
SYSTEMTIME thisTime1
'---Start time
GetSystemTime thisTime0
'---Dimension the array
redim int MyArray(maxcount)
' int=long integer 32 bit
dim count as long
'---Fill the array
for Count = lbound(MyArray) to ubound(MyArray)
MyArray(Count) = Count*Count '^2
next
'---End time
GetSystemTime thisTime1
'format 'str better here
print "total time to fill an EXT array of " + MaxCount + " elements: " + str(TimeLapsesMis(thisTime0,thisTime1), "###") + " msecs"
"
ha_basis pros
ha_drive
Bookmarks