@Rene Miner,
I think that's the reason. Currently, "Private" is making no difference.Am not sure if completely developed yet
Private and Public are working bit different as in .net
You will use it within type/end type to grant local or global access to the properties or methods of a type but not write it in front of everything but acting as a switch.
Its like
Type tExample 'Public '(default setting / not needed here) X As Double Y As Double Z as Double Private ' <<< all that follows until "Public" or "End Type" is from now private A As Long B As Long Function DoSomethingPrivate() End Function Public ' <<< switch to end private scope Function DoSomethingPublic(ByRef lA As Long, ByRef lB as Long ) ' here accessing Me.A or Me.B is possible Me.A= lB - lA Me.B = lB + lA since keyword "Me" signals a reference of tExample is accessing ' its own data only while lA = Me.A lB = Me.B ' were an illegal exploit since that would not obey the rules of privacy ' because its not only giving direct access to the variables but also ' tells theirs position in memory. Would lead to runtime error end function end type Private ' can not be private outside of type declarations
Am not sure if completely developed yet but if your code follows the rules
it will be compatible
running thinBasic in HP Pavillon Desktop 590 a0xxx 8GB Ram AMD A6-9225 Radeon R4 5Compute Cores 2C+3G @2.6GHz
Windows 11 Enterprise x64 Build 22000.100 (21H2) - "native boot" from .vhdx
(says the systeminfo. anything else says it were Windows 10 - but hey: thinbasic runs well )
@Rene Miner,
I think that's the reason. Currently, "Private" is making no difference.Am not sure if completely developed yet
Hi,
private / public are reserved keywords, but they have no effect at the moment.
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
How to write a property in an UDT ? The "Private" keyword is making no difference in script. Does the UDT section in thinBasic is incomplete ?
Hi gintibande,
I would say the most complete docs for UDT are currently available here:
https://thinbasic.github.io/book-thi...defined_types/
We are working on improving the help file docs to include this information.
Thanks for understanding.
P
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