PDA

View Full Version : thinBasic 1.7.0.0: 2008.11.02 refreshed version



ErosOlmi
02-11-2008, 22:24
thinBasic version 1.7.0.0: 2008.11.02 refreshed version.
_________________________________________________
Online help: http://www.thinbasic.org/public/applications/thinbasic/onlyforyoureyes/HTML/
Features implemented in version 1.7.0.0: http://www.thinbasic.org/public/applications/thinbasic/onlyforyoureyes/HTML/version_1_7_0_0.htm
_________________________________________________

Hi all.

I've refreshed thinBasic 1.7.0.0 with a new version.

This refresh introduces a new interesting feature in UDT handling: dynamic strings can now be used as elements inside UDT.
Declaration is like standard dynamic strings: MyUdtElement AS STRING
Those elements can hold any size string in both text only or binary format with a lenght limited only by the OS available memory.
ThinBasic will take care of memory releasing allocated by those elements when UDT variable finish its scope. On that side there is a limitation for the moment: only first level nesting UDT dynamic strings will be released by thinBasic engine. If a dynamic string is inside and UDT and that UDT is inside another UDT (and so on) thinBasic will not free its allocated memory. In those cases, it will be programmer responsibility to de-allocate dynamic strings just letting them be equal to empty string "".
Maybe this limitation will be solved in future versions.


For those of you that already received a message from me with the download link, JUST USE THE SAME LINK and substitute in the URL /20081101/ with /20081102/
If someone else would like to test new thinBasic before final release, just drop me a personal message here in forum and I will send you the URL where to download it.


Ciao.
Eros

ErosOlmi
02-11-2008, 22:26
We are very close to a final thinBasic 1.7.0.0
I'm waiting for Roberto to fix latest thinAir found important bugs and few tuning in UI module.

ErosOlmi
02-11-2008, 22:30
A quick example of dynamic string inside UDT:


TYPE MyType
'...
Name AS string
ID AS string
Notes AS string
'...
END TYPE


function TBMain() as long
DIM MyUSer as MyType

MyUSer.Name = "MyName"
MyUSer.ID = "MyID"
MyUSer.Notes = repeat$(100000, "Whatever string or data or binary sequence are allowed")

MSGBOX 0, _
"[" & MyUser.Name & "]" & $crlf & _
"[" & MyUser.ID & "]" & $crlf & _
"[" & left$(MyUser.Notes, 100) & "]" & $crlf & _
"MyUser.Notes has allocated " & len(MyUser.Notes) & " bytes."

end function