Thanks for latest update and all the new stuff! Enjoy your holiday.
Catventure.
Printable View
i have installed the new version, with its huge number of functions it is suitable for educational and scientific research. so now i have 2 versions on my hard disk : 1.9.16.17 and older one 1.8.9.0 . i have noticed there is a Pow function which is a C function in addition to the original '^' pow operator. it seems added after version 1.8.9.0
i don't like Pow since the '^' is easier to use but Pow can be useful also when copying math code from other sources using C syntax.
there is just one Basic there, which have Pow but not '^' and this is contradicting the Basic spirit. even the oldest basics have '^' : possibly they don't know how to implement the Pow as '^'
thanks Eros for the Update , and happy holiday
Thanks for the update. As soon i have access to my PC, i will test the installation against my virus check.
Have a great vacation.
Hi Eros,
Avira AntiVir Free didn't complain now with the new version of thinBasic. Thank you!!
Thanks Michael,
this has been bothering us for a while, good to know the situation is getting better!
Petr
there's still some debug-msg-box that appears if we have some invalid code.
Simple example:
Code:' i just omit the window-handle-parameter
MsgBox "hello", %MB_OK, "we error on purpose"
Thanks.
It is not a debug message box but thinBasic think first parameter is the handle of the parent window and try to transform message text into a number.
Anyway, next thinBasic version will have parent window handle as optional. New syntax will be:
So:Code:Result = MSGBOX([hParent,] Message [, Style [, Title [, Timeout [, UpdateCountDown, [, CountDownFormat ] ]] ] ] )
andCode:'---No parent window
Msgbox 0, "Test"
andCode:'---hwndParent is the handle of the parent window
Msgbox hwndParent, "Test"
Will be the parsed correctly.Code:'---No parent window, just message box
Msgbox "Test"
Since when can static udt-subelements be dynamic string?
I just tried out and i'm surprised. I never read an announcement about it and my opinion was, static udt-subelements in thinBasic can not be strings but i just tested it and found proof that i was wrong,
btw. TBMain in this example still appears to be a function of tTest in codebrowser ;)Code:Type tTest
Static sName As String
Function _Create(ByVal sName As String)
Me.sName = sName
End Function
Function TellYourName() As String
Function = Me.sName
End Function
End Type
Function TBMain()
Local dummy As tTest("Frank")
MsgBox 0, dummy.TellYourName, %MB_OK, "My name is"
End Function
I tested the atan2 function against online calculators and their answer does not match that of thinBasic's.
Check the image to see clearly this problem. Thanks.
Attachment 9687Code:Uses "Console"
Uses "Math"
Single angle = ATAN2(1, 3)
PrintL Str$(angle,6)
PrintL "Press a key to end program"
WaitKey
Also arccos is not working correctly.
The image shows it better.Attachment 9688Code:Uses "Console"
Uses "Math"
Single angle = ArcCos ( .983869910099907 )
PrintL Str$(angle,6)
PrintL "Press a key to end program"
WaitKey
kryton9, i check the atan2 only, will check the other later, thinbasic result in degrees while in online calc in radians. if we change to
angle = DegToRad(ATAN2(3, 1))
the answer wll be like online calc: 1.24904
https://www.easycalculation.com/trig...calculator.php
edit: i depends on the picture: it is written: angle = ATAN2(3, 1)