Hi Primo,
thanks a lot for reporting it. I think some recent change in parsing does not allow to call underscored methods.
Definitely worth further investigation, with fix or adjusted example as a result.
Petr
Maybe related to my other posts about udt and oop ,
while studying the oop samples, I found that thinBasic\SampleScripts\OOP\VariadicArrayAndType.tbasic sample has an error code 102 "Expected equal sign for UDT full buffer assignment or an UDT element name." at line 23.
but I didn't catch the meaning of the description.
Uses "Console" Type SubType data As String Function _Create(ByVal data As String) Me.data = data PrintL "Subtype created" In 12 End Function Function _Destroy() Me.data = "" PrintL "Subtype destroyed" In 12 End Function End Type Type Base s As SubType Function _Create(ByVal data As String) PrintL "Base created" In 10 Me.s._Create(data) End Function Function _Destroy() Me.s._Destroy PrintL "Base destroyed" In 10 End Function End Type PrintL f((116, 104, 105, 110, 66, 97, 115, 105, 99)) In 11 WaitKey Function f( x(Any) As Byte) As String Dim b As Base(Memory_Get(VarPtr(x(1)), UBound(x))) Function = b.s.data b._Destroy PrintL "should print empty quotes now" & $DQ & b.s.data & $DQ In 8 PrintL PrintL "result as follows:" End Function
ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64
Hi Primo,
thanks a lot for reporting it. I think some recent change in parsing does not allow to call underscored methods.
Definitely worth further investigation, with fix or adjusted example as a result.
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
Yes I think it does appear to be a problem with underscored methods. I recently got a new computer and wanted to try out the OpenGL reporting tool from this thread and got the same error. I'm using the newest version of thinBasic v1.11.2.0.
Operating System: Windows 10 Home 64-bit
CPU: Intel Celeron N4000 CPU @ 1.10GHz
Memory: 4.00GB RAM
Graphics: Intel UHD Graphics 600
Hi Matthew,
I fixed the issue with the OpenGL report tool, please re-download.
As thinBASIC introduced underscore methods as system ones (destructor/constructor - _create, _destroy), I think it would be wise to reserve them really to thinBASIC and not use them in normal code to avoid further collisions in the future.
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
Thanks Petr, it works fine now. I've uploaded the report here if anyone's interested. The new computer isn't anything special, just a cheap laptop but I'm quite surprised at what it can do.
Operating System: Windows 10 Home 64-bit
CPU: Intel Celeron N4000 CPU @ 1.10GHz
Memory: 4.00GB RAM
Graphics: Intel UHD Graphics 600
Intel does a great job on feature support & technical papers in the last years, in my opinion. Congratulations on new PC - I wish you many pleasant projects
GL_ARB_DIRECT_STATE_ACCESS is the extension I would like to play more this year - and your GPU supports it
Petr
Last edited by Petr Schreiber; 01-01-2020 at 15:15.
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
GL_ARB_direct_state_access
In unextended OpenGL, most mutation of state contained in objects is through
an indirection known as a binding. Objects are attached to a context (either
directly or indirectly via a container) and then commands to modify or
query their state are issued on that context, indirecting through its
attachments and into the underlying object. This is known as `bind-to-edit'.
This extension derives from the GL_EXT_direct_state_access extension, which
added accessors for most state on most objects, allowing it to be queried
and modified without the object needing to be bound to a context. In cases
where a single property of an object is to be modified, directly accessing
its state can be more efficient than binding the object to the context and
then indirecting through it. Further, directly accessing the state of
objects through their names rather than by bind-to-edit does not disturb
the bindings of the current context, which is useful for tools, middleware
and other applications that are unaware of the outer state but it can also
avoid cases of redundant state changes. (...)
ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64
Unlimited p.o.w.e.r - I have seen demos where it brought really crazy performance benefits.
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
...but the performance benefits are worth it.
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