Here's some code:
Line 5 throws a runtime error: "Missing Close Parens", "Token found: ABA". That happens even if the function takes its only parameter by reference instead of by value.Function aba(nme As Guid)As String Return "hello world" End Function Dim qqq As Guid MsgBox 0 , aba(qqq)
If I replace every occurrence of "guid" in the code with, say, "quad", it works flawlessly.
I suppose that that is intended behavior, as per the thinBasic Help Manual on the topic of GUID (language->data types->GUID):
However, a priori it was not obvious that the quote meant that GUID was not an accepted type for arguments. This has caused me some lossage. To prevent inflicting further lossage on any more unsuspecting users, I suggest changing the documentation to be more explicit about this issue.The GUID variable is typically used only as a parameter, rather than as a term in an expression.
sorry for the inconvenience.
In reality your code was supposed to work but there must be a parsing error in passing GUID data type to sub/functions.
I will have a look.
In the meantime, if you need to pass a GUID to a sub/function, please use a String parameter like the following. thinBasic will take care of internal conversions:
Thanks for reporting.Function aba(nme As string) As String Return "hello world: " & GUIDTXT$(nme) End Function Dim qqq As Guid = Guid$ MsgBox 0 , aba(qqq)